Struct radius_rust::protocol::radius_packet::RadiusAttribute [−][src]
pub struct RadiusAttribute { /* fields omitted */ }
Represents an attribute, which would be sent to RADIUS Server/client as a part of RadiusPacket
Implementations
impl RadiusAttribute
[src]
pub fn create_by_name(
dictionary: &Dictionary,
attribute_name: &str,
value: Vec<u8>
) -> Option<RadiusAttribute>
[src]
dictionary: &Dictionary,
attribute_name: &str,
value: Vec<u8>
) -> Option<RadiusAttribute>
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]
dictionary: &Dictionary,
attribute_code: u8,
value: Vec<u8>
) -> Option<RadiusAttribute>
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]
Overriddes RadiusAttribute value
Mainly used when building Message-Authenticator
pub fn id(&self) -> u8
[src]
Returns RadiusAttribute id
pub fn value(&self) -> &[u8]
[src]
Returns RadiusAttribute value
pub fn name(&self) -> &str
[src]
Returns RadiusAttribute name
pub fn verify_original_value(
&self,
allowed_type: &Option<SupportedAttributeTypes>
) -> Result<(), RadiusError>
[src]
&self,
allowed_type: &Option<SupportedAttributeTypes>
) -> Result<(), RadiusError>
Verifies RadiusAttribute value, based on the ATTRIBUTE code type
pub fn original_string_value(
&self,
allowed_type: &Option<SupportedAttributeTypes>
) -> Result<String, RadiusError>
[src]
&self,
allowed_type: &Option<SupportedAttributeTypes>
) -> Result<String, RadiusError>
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]
&self,
allowed_type: &Option<SupportedAttributeTypes>
) -> Result<u64, RadiusError>
Returns RadiusAttribute value, if the attribute is dictionary’s ATTRIBUTE with code type integer of date
Trait Implementations
impl Debug for RadiusAttribute
[src]
impl PartialEq<RadiusAttribute> for RadiusAttribute
[src]
fn eq(&self, other: &RadiusAttribute) -> bool
[src]
fn ne(&self, other: &RadiusAttribute) -> bool
[src]
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,