[][src]Struct netlink_proto::NetlinkFramed

pub struct NetlinkFramed<C> { /* fields omitted */ }

Implementations

impl<C> NetlinkFramed<C>[src]

pub fn new(socket: Socket, codec: C) -> NetlinkFramed<C>[src]

Create a new NetlinkFramed backed by the given socket and codec.

See struct level documentation for more details.

pub fn get_ref(&self) -> &Socket[src]

Returns a reference to the underlying I/O stream wrapped by Framed.

Note

Care should be taken to not tamper with the underlying stream of data coming in as it may corrupt the stream of frames otherwise being worked with.

pub fn get_mut(&mut self) -> &mut Socket[src]

Returns a mutable reference to the underlying I/O stream wrapped by Framed.

Note

Care should be taken to not tamper with the underlying stream of data coming in as it may corrupt the stream of frames otherwise being worked with.

pub fn into_inner(self) -> Socket[src]

Consumes the Framed, returning its underlying I/O stream.

Trait Implementations

impl<C: Encoder + Unpin> Sink<(<C as Encoder>::Item, SocketAddr)> for NetlinkFramed<C>[src]

type Error = C::Error

The type of value produced by the sink when an error occurs.

impl<C> Stream for NetlinkFramed<C> where
    C: Decoder + Unpin,
    C::Error: Error
[src]

type Item = (C::Item, SocketAddr)

Values yielded by the stream.

Auto Trait Implementations

impl<C> !RefUnwindSafe for NetlinkFramed<C>

impl<C> Send for NetlinkFramed<C> where
    C: Send

impl<C> Sync for NetlinkFramed<C> where
    C: Sync

impl<C> Unpin for NetlinkFramed<C> where
    C: Unpin

impl<C> !UnwindSafe for NetlinkFramed<C>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, Item> SinkExt<Item> for T where
    T: Sink<Item> + ?Sized
[src]

impl<T> StreamExt for T where
    T: Stream + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.