Trait netlink_packet_route::traits::Emitable

source ·
pub trait Emitable {
    // Required methods
    fn buffer_len(&self) -> usize;
    fn emit(&self, buffer: &mut [u8]);
}
Expand description

A type that implements Emitable can be serialized.

Required Methods§

source

fn buffer_len(&self) -> usize

Return the length of the serialized data.

source

fn emit(&self, buffer: &mut [u8])

Serialize this types and write the serialized data into the given buffer.

§Panic

This method panic if the buffer is not big enough. You must make sure the buffer is big enough before calling this method. You can use buffer_len() to check how big the storage needs to be.

Implementations on Foreign Types§

source§

impl<'a, T> Emitable for &'a [T]
where T: Nla,

source§

fn buffer_len(&self) -> usize

source§

fn emit(&self, buffer: &mut [u8])

Implementors§

source§

impl Emitable for RtnlMessage

source§

impl Emitable for netlink_packet_route::rtnl::address::nlas::CacheInfo

source§

impl Emitable for AddressHeader

source§

impl Emitable for AddressMessage

source§

impl Emitable for Icmp6Stats

source§

impl Emitable for Inet6CacheInfo

source§

impl Emitable for Inet6DevConf

source§

impl Emitable for Inet6Stats

source§

impl Emitable for InetDevConf

source§

impl Emitable for Map

source§

impl Emitable for Stats64

source§

impl Emitable for netlink_packet_route::rtnl::link::nlas::Stats

source§

impl Emitable for LinkHeader

source§

impl Emitable for LinkMessage

source§

impl Emitable for netlink_packet_route::rtnl::neighbour::nlas::CacheInfo

source§

impl Emitable for NeighbourHeader

source§

impl Emitable for NeighbourMessage

source§

impl Emitable for Config

source§

impl Emitable for netlink_packet_route::rtnl::neighbour_table::nlas::Stats

source§

impl Emitable for NeighbourTableHeader

source§

impl Emitable for NeighbourTableMessage

source§

impl Emitable for NsidHeader

source§

impl Emitable for NsidMessage

source§

impl Emitable for netlink_packet_route::rtnl::route::nlas::CacheInfo

source§

impl Emitable for MfcStats

source§

impl Emitable for NextHop

source§

impl Emitable for RouteHeader

source§

impl Emitable for RouteMessage

source§

impl Emitable for RuleHeader

source§

impl Emitable for RuleMessage

source§

impl Emitable for TcMirred

source§

impl Emitable for netlink_packet_route::rtnl::tc::nlas::Stats

source§

impl Emitable for StatsBasic

source§

impl Emitable for StatsQueue

source§

impl Emitable for TcGen

source§

impl Emitable for Key

source§

impl Emitable for Sel

source§

impl Emitable for TcHeader

source§

impl Emitable for TcMessage

source§

impl Emitable for ErrorMessage

source§

impl Emitable for NetlinkHeader

source§

impl<I> Emitable for NetlinkMessage<I>

source§

impl<T> Emitable for T
where T: Nla,