Struct OSPFv2

Source
pub struct OSPFv2 {
    pub remote: Ipv4Addr,
    pub local: Ipv4Addr,
    pub message: Vec<u8>,
}
Expand description

The OSPFv2 struct represents the data contained in an MRT record type of OSPFv2.

Fields§

§remote: Ipv4Addr

The IPv4 address from which this message was received.

§local: Ipv4Addr

The IPv4 address of the interface on which this message was received.

§message: Vec<u8>

The binary OSPFv2 message.

Implementations§

Source§

impl OSPFv2

Source

pub fn parse(header: &Header, stream: impl Read) -> Result<OSPFv2, Error>

§Summary

Used to parse OSPFv2 MRT records.

§Panics

This function does not panic.

§Errors

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

§Safety

This function does not make use of unsafe code.

Trait Implementations§

Source§

impl Debug for OSPFv2

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for OSPFv2

§

impl RefUnwindSafe for OSPFv2

§

impl Send for OSPFv2

§

impl Sync for OSPFv2

§

impl Unpin for OSPFv2

§

impl UnwindSafe for OSPFv2

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.