fuchsia_bluetooth::inspect

Trait ToProperty

Source
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§