pub trait DeserializeProperty<'dtb>: Sized {
// Required method
fn deserialize(
blob_prop: Property<'dtb>,
cx: NodeContext<'_>,
) -> Result<Self>;
}Expand description
Types that can be parsed from a devicetree property.
Required Methods§
Sourcefn deserialize(blob_prop: Property<'dtb>, cx: NodeContext<'_>) -> Result<Self>
fn deserialize(blob_prop: Property<'dtb>, cx: NodeContext<'_>) -> Result<Self>
Parses a devicetree property into this type.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl<'dtb> DeserializeProperty<'dtb> for &'dtb str
impl<'dtb> DeserializeProperty<'dtb> for &'dtb str
fn deserialize(blob_prop: Property<'dtb>, _cx: NodeContext<'_>) -> Result<Self>
Source§impl<'dtb> DeserializeProperty<'dtb> for &'dtb [u8]
impl<'dtb> DeserializeProperty<'dtb> for &'dtb [u8]
fn deserialize(blob_prop: Property<'dtb>, _cx: NodeContext<'_>) -> Result<Self>
Source§impl<'dtb> DeserializeProperty<'dtb> for &'dtb [u32]
impl<'dtb> DeserializeProperty<'dtb> for &'dtb [u32]
Source§fn deserialize(blob_prop: Property<'dtb>, _cx: NodeContext<'_>) -> Result<Self>
fn deserialize(blob_prop: Property<'dtb>, _cx: NodeContext<'_>) -> Result<Self>
Gives a devicetree property value as a big-endian u32 slice.
Source§impl<'dtb> DeserializeProperty<'dtb> for bool
impl<'dtb> DeserializeProperty<'dtb> for bool
fn deserialize(blob_prop: Property<'dtb>, _cx: NodeContext<'_>) -> Result<Self>
Source§impl<'dtb> DeserializeProperty<'dtb> for u32
impl<'dtb> DeserializeProperty<'dtb> for u32
Source§fn deserialize(blob_prop: Property<'dtb>, _cx: NodeContext<'_>) -> Result<Self>
fn deserialize(blob_prop: Property<'dtb>, _cx: NodeContext<'_>) -> Result<Self>
Gives a devicetree property value as a native-endian u32.
Source§impl<'dtb> DeserializeProperty<'dtb> for u64
impl<'dtb> DeserializeProperty<'dtb> for u64
Source§fn deserialize(blob_prop: Property<'dtb>, _cx: NodeContext<'_>) -> Result<Self>
fn deserialize(blob_prop: Property<'dtb>, _cx: NodeContext<'_>) -> Result<Self>
Gives a devicetree property value as a native-endian u64.