Struct sawp_diameter::Header

source ·
pub struct Header { /* private fields */ }

Implementations§

source§

impl Header

source

pub const REQUEST_FLAG: u8 = 128u8

source

pub const PROXIABLE_FLAG: u8 = 64u8

source

pub const ERROR_FLAG: u8 = 32u8

source

pub const POTENTIALLY_RETRANSMITTED_FLAG: u8 = 16u8

source

pub const RESERVED_MASK: u8 = 15u8

source

pub fn is_request(&self) -> bool

If set, the message is a request. If cleared, the message is an answer.

source

pub fn is_proxiable(&self) -> bool

If set, the message MAY be proxied, relayed, or redirected. If cleared, the message MUST be locally processed.

source

pub fn is_error(&self) -> bool

If set, the message contains a protocol error, and the message will not conform to the CCF described for this command. Messages with the ‘E’ bit set are commonly referred to as error messages. This bit MUST NOT be set in request messages

source

pub fn is_potentially_retransmitted(&self) -> bool

This flag is set after a link failover procedure, to aid the removal of duplicate requests. It is set when resending requests not yet acknowledged, as an indication of a possible duplicate due to a link failure.

source

pub fn get_reserved(&self) -> u8

These flag bits are reserved for future use; they MUST be set to zero and ignored by the receiver.

source

pub fn length(&self) -> usize

Length of AVPs

source

pub fn parse(input: &[u8]) -> IResult<&[u8], (Self, ErrorFlags)>

Trait Implementations§

source§

impl Debug for Header

source§

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

Formats the value using the given formatter. Read more
source§

impl PartialEq<Header> for Header

source§

fn eq(&self, other: &Header) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for Header

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

const: unstable · 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 Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.