pub enum Property<Key = String> {
    String(Key, String),
    Bytes(Key, Vec<u8, Global>),
    Int(Key, i64),
    Uint(Key, u64),
    Double(Key, f64),
    Bool(Key, bool),
    DoubleArray(Key, ArrayContent<f64>),
    IntArray(Key, ArrayContent<i64>),
    UintArray(Key, ArrayContent<u64>),
    StringList(Key, Vec<String, Global>),
}
Expand description

A named property. Each of the fields consists of (name, value).

Key is the type of the property’s name and is typically a string. In cases where there are well known, common property names, an alternative may be used to reduce copies of the name.

Variants

String(Key, String)

The value is a string.

Bytes(Key, Vec<u8, Global>)

The value is a bytes vector.

Int(Key, i64)

The value is an integer.

Uint(Key, u64)

The value is an unsigned integer.

Double(Key, f64)

The value is a double.

Bool(Key, bool)

The value is a boolean.

DoubleArray(Key, ArrayContent<f64>)

The value is a double array.

IntArray(Key, ArrayContent<i64>)

The value is an integer array.

UintArray(Key, ArrayContent<u64>)

The value is an unsigned integer array.

StringList(Key, Vec<String, Global>)

The value is a list of strings.

Implementations

Returns the String value or None if the property isn’t of that type

Returns the Bytes value or None if the property isn’t of that type

Returns the Int value or None if the property isn’t of that type

Returns the Uint value or None if the property isn’t of that type

Returns the Double value or None if the property isn’t of that type

Returns the Bool value or None if the property isn’t of that type

Returns the DoubleArray value or None if the property isn’t of that type

Returns the IntArray value or None if the property isn’t of that type

Returns the UintArray value or None if the property isn’t of that type

Returns the StringList value or None if the property isn’t of that type

Returns the key of a property

Returns a string indicating which variant of property this is, useful for printing debug values.

Returns the key of a property.

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
Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
Returns a map from a graph’s node to the children of that node, indexed by their Trie-equivalent prefix. Read more
Returns the vector of values that a graph’s node is storing. Read more

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.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

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

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. 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.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more