pub trait ToProperty {
    type PropertyType;

    // Required method
    fn to_property(&self) -> Self::PropertyType;
}
Expand description

Convert a type to the correct supported Inspect Property type. This is used in Bluetooth to ensure consistent representations of values in Inspect.

Note: It represents them appropriately for Bluetooth but may not be the appropriate type for other use cases. It shouldn’t be used outside of the Bluetooth project.

Required Associated Types§

Required Methods§

source

fn to_property(&self) -> Self::PropertyType

Implementations on Foreign Types§

source§

impl ToProperty for Option<bool>

source§

impl ToProperty for bool

source§

impl ToProperty for String

source§

impl<T, V> ToProperty for Option<Vec<T>>
where T: ToProperty<PropertyType = V>, V: ToString,

Vectors of T show up as a comma separated list string property. None types are represented as an empty string.

source§

impl<T, V> ToProperty for Vec<T>
where T: ToProperty<PropertyType = V>, V: ToString,

Implementors§