pub struct Update {
pub withdrawn_routes: Vec<NLRIEncoding>,
pub attributes: Vec<PathAttribute>,
pub announced_routes: Vec<NLRIEncoding>,
}
Expand description
Represents a BGP Update message.
Fields§
§withdrawn_routes: Vec<NLRIEncoding>
A collection of routes that have been withdrawn.
attributes: Vec<PathAttribute>
A collection of attributes associated with the announced routes.
announced_routes: Vec<NLRIEncoding>
A collection of routes that are announced by the peer.
Implementations§
Source§impl Update
impl Update
Sourcepub fn parse(
header: &Header,
stream: &mut impl Read,
capabilities: &Capabilities,
) -> Result<Update, Error>
pub fn parse( header: &Header, stream: &mut impl Read, capabilities: &Capabilities, ) -> Result<Update, Error>
docs
Sourcepub fn get(&self, identifier: Identifier) -> Option<&PathAttribute>
pub fn get(&self, identifier: Identifier) -> Option<&PathAttribute>
Retrieves the first PathAttribute that matches the given identifier.
Sourcepub fn is_announcement(&self) -> bool
pub fn is_announcement(&self) -> bool
Checks if this UPDATE message contains announced prefixes.
Sourcepub fn is_withdrawal(&self) -> bool
pub fn is_withdrawal(&self) -> bool
Checks if this UPDATE message contains withdrawn routes..
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Update
impl RefUnwindSafe for Update
impl Send for Update
impl Sync for Update
impl Unpin for Update
impl UnwindSafe for Update
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more