netlink_packet_core

Trait NetlinkDeserializable

Source
pub trait NetlinkDeserializable: Sized {
    type Error: Error + Send + Sync + 'static;

    // Required method
    fn deserialize(
        header: &NetlinkHeader,
        payload: &[u8],
    ) -> Result<Self, Self::Error>;
}
Expand description

A NetlinkDeserializable type can be deserialized from a buffer

Required Associated Types§

Source

type Error: Error + Send + Sync + 'static

Required Methods§

Source

fn deserialize( header: &NetlinkHeader, payload: &[u8], ) -> Result<Self, Self::Error>

Deserialize the given buffer into Self.

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.

Implementors§