pub enum PropertyValue {
    String(RcString),
    Bytes(Vec<u8>),
    SInt(i32),
    UInt(u32),
    Float(f64),
}
Expand description

Property value type. Properties can hold different types that are encapsulated in this enum.

Variants

String(RcString)

Property is a string.

Bytes(Vec<u8>)

Property is a byte string.

SInt(i32)

Property is a signed integer.

UInt(u32)

Property is an unsigned integer.

Float(f64)

Property is a float.

Implementations

Try to get a string value.

Try to get a &str value. Works for String property values.

Try to get a byte string value.

Try to get a float value.

Try to get an i32 value.

Try to get an i32 value.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.