[][src]Struct bgp_rs::Reader

pub struct Reader<T> where
    T: Read
{ pub stream: T, }

The BGPReader can read BGP messages from a BGP-formatted stream.

Fields

stream: T

The stream from which BGP messages will be read.

Methods

impl<T> Reader<T> where
    T: Read
[src]

pub fn read(&mut self) -> Result<(Header, Message), Error>[src]

Reads the next BGP message in the stream.

Panics

This function does not panic.

Errors

Any IO error will be returned while reading from the stream. If an ill-formatted stream provided behavior will be undefined.

Safety

This function does not make use of unsafe code.

Auto Trait Implementations

impl<T> Send for Reader<T> where
    T: Send

impl<T> Sync for Reader<T> where
    T: Sync

Blanket Implementations

impl<T> From for T[src]

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

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.