pub struct DataBytes<'input> {
pub bytes: &'input [u8],
pub pos: usize,
pub total: usize,
pub limits: Vec<usize>,
}
Fields
bytes: &'input [u8]
pos: usize
total: usize
limits: Vec<usize>
Implementations
pub fn read_nlri_prefix(
&mut self,
afi: &Afi,
add_path: bool
) -> Result<NetworkPrefix, ParserErrorKind>
pub fn read_nlri_prefix(
&mut self,
afi: &Afi,
add_path: bool
) -> Result<NetworkPrefix, ParserErrorKind>
Read announced/withdrawn prefix.
The length in bits is 1 byte, and then based on the IP version it reads different number of bytes.
If the add_path
is true, it will also first read a 4-byte path id first; otherwise, a path-id of 0
is automatically set.
pub fn read_asns(
&mut self,
as_length: &AsnLength,
count: usize
) -> Result<Vec<Asn>, ParserErrorKind>
pub fn parse_nlri_list(
&mut self,
add_path: bool,
afi: &Afi,
total_bytes: usize
) -> Result<Vec<NetworkPrefix>, ParserErrorKind>
Auto Trait Implementations
impl<'input> RefUnwindSafe for DataBytes<'input>
impl<'input> UnwindSafe for DataBytes<'input>
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more