Struct radius_rust::protocol::radius_packet::RadiusPacket [−][src]
pub struct RadiusPacket { /* fields omitted */ }
Expand description
Represents RADIUS packet
Implementations
impl RadiusPacket
[src]
impl RadiusPacket
[src]pub fn initialise_packet(code: TypeCode) -> RadiusPacket
[src]
pub fn initialise_packet(code: TypeCode) -> RadiusPacket
[src]Initialises RADIUS packet with random ID and authenticator
pub fn initialise_packet_from_bytes(
dictionary: &Dictionary,
bytes: &[u8]
) -> Result<RadiusPacket, RadiusError>
[src]
pub fn initialise_packet_from_bytes(
dictionary: &Dictionary,
bytes: &[u8]
) -> Result<RadiusPacket, RadiusError>
[src]Initialises RADIUS packet from raw bytes
pub fn set_attributes(&mut self, attributes: Vec<RadiusAttribute>)
[src]
pub fn set_attributes(&mut self, attributes: Vec<RadiusAttribute>)
[src]Sets attrbiutes
pub fn override_id(&mut self, new_id: u8)
[src]
pub fn override_id(&mut self, new_id: u8)
[src]Overrides RadiusPacket id
pub fn override_authenticator(&mut self, new_authenticator: Vec<u8>)
[src]
pub fn override_authenticator(&mut self, new_authenticator: Vec<u8>)
[src]Overrides RadiusPacket authenticator
pub fn override_message_authenticator(
&mut self,
new_message_authenticator: Vec<u8>
) -> Result<(), RadiusError>
[src]
pub fn override_message_authenticator(
&mut self,
new_message_authenticator: Vec<u8>
) -> Result<(), RadiusError>
[src]Overrides RadiusPacket Message-Authenticator
Note: would fail if RadiusPacket has no Message-Authenticator attribute defined
pub fn message_authenticator(&self) -> Result<&[u8], RadiusError>
[src]
pub fn message_authenticator(&self) -> Result<&[u8], RadiusError>
[src]Returns Message-Authenticator value, if exists in RadiusPacket
pub fn authenticator(&self) -> &[u8]
[src]
pub fn authenticator(&self) -> &[u8]
[src]Returns RadiusPacket authenticator
pub fn attributes(&self) -> &[RadiusAttribute]
[src]
pub fn attributes(&self) -> &[RadiusAttribute]
[src]Returns RadiusPacket attributes
pub fn attribute_by_name(&self, name: &str) -> Option<&RadiusAttribute>
[src]
pub fn attribute_by_name(&self, name: &str) -> Option<&RadiusAttribute>
[src]Returns RadiusAttribute with given name
pub fn attribute_by_id(&self, id: u8) -> Option<&RadiusAttribute>
[src]
pub fn attribute_by_id(&self, id: u8) -> Option<&RadiusAttribute>
[src]Returns RadiusAttribute with given id
Trait Implementations
impl Debug for RadiusPacket
[src]
impl Debug for RadiusPacket
[src]impl PartialEq<RadiusPacket> for RadiusPacket
[src]
impl PartialEq<RadiusPacket> for RadiusPacket
[src]fn eq(&self, other: &RadiusPacket) -> bool
[src]
fn eq(&self, other: &RadiusPacket) -> bool
[src]This method tests for self
and other
values to be equal, and is used
by ==
. Read more
fn ne(&self, other: &RadiusPacket) -> bool
[src]
fn ne(&self, other: &RadiusPacket) -> bool
[src]This method tests for !=
.
impl StructuralPartialEq for RadiusPacket
[src]
Auto Trait Implementations
impl RefUnwindSafe for RadiusPacket
impl Send for RadiusPacket
impl Sync for RadiusPacket
impl Unpin for RadiusPacket
impl UnwindSafe for RadiusPacket
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>,