Struct radius_rust::protocol::radius_packet::RadiusAttribute [−][src]
pub struct RadiusAttribute { /* fields omitted */ }
Expand description
Represents an attribute, which would be sent to RADIUS Server/client as a part of RadiusPacket
Implementations
impl RadiusAttribute
[src]
impl RadiusAttribute
[src]pub fn create_by_name(
dictionary: &Dictionary,
attribute_name: &str,
value: Vec<u8>
) -> Option<RadiusAttribute>
[src]
pub fn create_by_name(
dictionary: &Dictionary,
attribute_name: &str,
value: Vec<u8>
) -> Option<RadiusAttribute>
[src]Creates RadiusAttribute with given name
Returns None, if ATTRIBUTE with such name is not found in Dictionary
pub fn create_by_id(
dictionary: &Dictionary,
attribute_code: u8,
value: Vec<u8>
) -> Option<RadiusAttribute>
[src]
pub fn create_by_id(
dictionary: &Dictionary,
attribute_code: u8,
value: Vec<u8>
) -> Option<RadiusAttribute>
[src]Creates RadiusAttribute with given id
Returns None, if ATTRIBUTE with such id is not found in Dictionary
pub fn override_value(&mut self, new_value: Vec<u8>)
[src]
pub fn override_value(&mut self, new_value: Vec<u8>)
[src]Overriddes RadiusAttribute value
Mainly used when building Message-Authenticator
pub fn verify_original_value(
&self,
allowed_type: &Option<SupportedAttributeTypes>
) -> Result<(), RadiusError>
[src]
pub fn verify_original_value(
&self,
allowed_type: &Option<SupportedAttributeTypes>
) -> Result<(), RadiusError>
[src]Verifies RadiusAttribute value, based on the ATTRIBUTE code type
pub fn original_string_value(
&self,
allowed_type: &Option<SupportedAttributeTypes>
) -> Result<String, RadiusError>
[src]
pub fn original_string_value(
&self,
allowed_type: &Option<SupportedAttributeTypes>
) -> Result<String, RadiusError>
[src]Returns RadiusAttribute value, if the attribute is dictionary’s ATTRIBUTE with code type string, ipaddr, ipv6addr or aipv6prefix
pub fn original_integer_value(
&self,
allowed_type: &Option<SupportedAttributeTypes>
) -> Result<u64, RadiusError>
[src]
pub fn original_integer_value(
&self,
allowed_type: &Option<SupportedAttributeTypes>
) -> Result<u64, RadiusError>
[src]Returns RadiusAttribute value, if the attribute is dictionary’s ATTRIBUTE with code type integer of date
Trait Implementations
impl Debug for RadiusAttribute
[src]
impl Debug for RadiusAttribute
[src]impl PartialEq<RadiusAttribute> for RadiusAttribute
[src]
impl PartialEq<RadiusAttribute> for RadiusAttribute
[src]fn eq(&self, other: &RadiusAttribute) -> bool
[src]
fn eq(&self, other: &RadiusAttribute) -> bool
[src]This method tests for self
and other
values to be equal, and is used
by ==
. Read more
fn ne(&self, other: &RadiusAttribute) -> bool
[src]
fn ne(&self, other: &RadiusAttribute) -> bool
[src]This method tests for !=
.
impl StructuralPartialEq for RadiusAttribute
[src]
Auto Trait Implementations
impl RefUnwindSafe for RadiusAttribute
impl Send for RadiusAttribute
impl Sync for RadiusAttribute
impl Unpin for RadiusAttribute
impl UnwindSafe for RadiusAttribute
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,