Struct sawp_diameter::AVP

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

Implementations§

source§

impl AVP

source

pub const VENDOR_SPECIFIC_FLAG: u8 = 128u8

source

pub const MANDATORY_FLAG: u8 = 64u8

source

pub const PROTECTED_FLAG: u8 = 32u8

source

pub const RESERVED_MASK: u8 = 31u8

source

pub fn is_vendor_specific(&self) -> bool

The ‘V’ bit, known as the Vendor-Specific bit, indicates whether the optional Vendor-ID field is present in the AVP header. When set, the AVP Code belongs to the specific vendor code address space.

source

pub fn is_mandatory(&self) -> bool

The ‘M’ bit, known as the Mandatory bit, indicates whether the receiver of the AVP MUST parse and understand the semantics of the AVP including its content.

source

pub fn is_protected(&self) -> bool

The ‘P’ bit, known as the Protected bit, has been reserved for future usage of end-to-end security

source

pub fn get_reserved(&self) -> u8

The sender of the AVP MUST set ‘R’ (reserved) bits to 0 and the receiver SHOULD ignore all ‘R’ (reserved) bits.

source

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

Trait Implementations§

source§

impl Debug for AVP

source§

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

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

impl PartialEq<AVP> for AVP

source§

fn eq(&self, other: &AVP) -> 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 AVP

Auto Trait Implementations§

§

impl RefUnwindSafe for AVP

§

impl Send for AVP

§

impl Sync for AVP

§

impl Unpin for AVP

§

impl UnwindSafe for AVP

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.