FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    Size3D

    struct · ferroui-media3d · v0.5.0

    struct Size3D
    

    The extent of a box in 3D space, with double-precision dimensions (WPF's System.Windows.Media.Media3D.Size3D).

    A dimension is never negative, except in Size3D::EMPTY, the size of no box, whose dimensions are negative infinity. The members that WPF guards with exceptions return a Size3DError.

    View source

    Members

    EMPTY

    const EMPTY: Size3D
    

    The size of no box (WPF's Size3D.Empty): every dimension negative infinity.

    Source

    new

    fn new(x: f64, y: f64, z: f64) -> Result<Self, Size3DError>
    

    A size with the given dimensions; Size3DError::NegativeDimension when one is negative.

    Source

    is_empty

    fn is_empty(self: &Self) -> bool
    

    Whether this is Size3D::EMPTY.

    Source

    x

    fn x(self: &Self) -> f64
    

    The extent along the X axis.

    Source

    y

    fn y(self: &Self) -> f64
    

    The extent along the Y axis.

    Source

    z

    fn z(self: &Self) -> f64
    

    The extent along the Z axis.

    Source

    set_x

    fn set_x(self: &mut Self, value: f64) -> Result<(), Size3DError>
    

    Sets the extent along the X axis.

    Source

    set_y

    fn set_y(self: &mut Self, value: f64) -> Result<(), Size3DError>
    

    Sets the extent along the Y axis.

    Source

    set_z

    fn set_z(self: &mut Self, value: f64) -> Result<(), Size3DError>
    

    Sets the extent along the Z axis.

    Source

    parse

    fn parse(text: &str) -> Result<Self, FormatError>
    

    Parses the text form: "Empty", or "x,y,z" (commas, white space or both between the numbers) in the invariant culture, none of them negative.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • Borrow<T>
    • BorrowMut<T>
    • CloneToUninit
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ToOwned
    • ToString
    • PropertyValue
    • AnyValue
    • ClassDefaults
    • ErasedDestructor
    • IntoEither
    • MarkupTyped
    • Clone
    • Copy
    • Debug
    • StructuralPartialEq
    • PartialEq
    • Default
    • From<Size3D>
    • FromStr
    • Display
    • From<Vector3D>

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.