[−][src]Struct radius::core::avp::AVP
This struct represents a attribute-value pair.
Implementations
impl AVP
[src]
pub fn from_u32(typ: AVPType, value: u32) -> Self
[src]
(This method is for dictionary developers) make an AVP from a u32 value.
pub fn from_u16(typ: AVPType, value: u16) -> Self
[src]
(This method is for dictionary developers) make an AVP from a u16 value.
pub fn from_tagged_u32(typ: AVPType, tag: Option<&Tag>, value: u32) -> Self
[src]
(This method is for dictionary developers) make an AVP from a tagged u32 value.
pub fn from_string(typ: AVPType, value: &str) -> Self
[src]
(This method is for dictionary developers) make an AVP from a string value.
pub fn from_tagged_string(typ: AVPType, tag: Option<&Tag>, value: &str) -> Self
[src]
(This method is for dictionary developers) make an AVP from a tagged string value.
pub fn from_bytes(typ: AVPType, value: &[u8]) -> Self
[src]
(This method is for dictionary developers) make an AVP from bytes.
pub fn from_ipv4(typ: AVPType, value: &Ipv4Addr) -> Self
[src]
(This method is for dictionary developers) make an AVP from a IPv4 value.
pub fn from_ipv4_prefix(typ: AVPType, prefix: &[u8]) -> Result<Self, AVPError>
[src]
(This method is for dictionary developers) make an AVP from a IPv4-prefix value.
pub fn from_ipv6(typ: AVPType, value: &Ipv6Addr) -> Self
[src]
(This method is for dictionary developers) make an AVP from a IPv6 value.
pub fn from_ipv6_prefix(typ: AVPType, prefix: &[u8]) -> Result<Self, AVPError>
[src]
(This method is for dictionary developers) make an AVP from a IPv6-prefix value.
pub fn from_user_password(
typ: AVPType,
plain_text: &[u8],
secret: &[u8],
request_authenticator: &[u8]
) -> Result<Self, AVPError>
[src]
typ: AVPType,
plain_text: &[u8],
secret: &[u8],
request_authenticator: &[u8]
) -> Result<Self, AVPError>
(This method is for dictionary developers) make an AVP from a user-password value. see also: https://tools.ietf.org/html/rfc2865#section-5.2
pub fn from_date(typ: AVPType, dt: &DateTime<Utc>) -> Self
[src]
(This method is for dictionary developers) make an AVP from a date value.
pub fn from_tunnel_password(
typ: AVPType,
tag: Option<&Tag>,
plain_text: &[u8],
secret: &[u8],
request_authenticator: &[u8]
) -> Result<Self, AVPError>
[src]
typ: AVPType,
tag: Option<&Tag>,
plain_text: &[u8],
secret: &[u8],
request_authenticator: &[u8]
) -> Result<Self, AVPError>
(This method is for dictionary developers) make an AVP from a tunne-password value. see also: https://tools.ietf.org/html/rfc2868#section-3.5
pub fn encode_u32(&self) -> Result<u32, AVPError>
[src]
(This method is for dictionary developers) encode an AVP into a u32 value.
pub fn encode_u16(&self) -> Result<u16, AVPError>
[src]
(This method is for dictionary developers) encode an AVP into a u16 value.
pub fn encode_tagged_u32(&self) -> Result<(u32, Tag), AVPError>
[src]
(This method is for dictionary developers) encode an AVP into a tag and u32 value.
pub fn encode_string(&self) -> Result<String, AVPError>
[src]
(This method is for dictionary developers) encode an AVP into a string value.
pub fn encode_tagged_string(&self) -> Result<(String, Option<Tag>), AVPError>
[src]
(This method is for dictionary developers) encode an AVP into a tag and string value.
pub fn encode_bytes(&self) -> Vec<u8>
[src]
(This method is for dictionary developers) encode an AVP into bytes.
pub fn encode_ipv4(&self) -> Result<Ipv4Addr, AVPError>
[src]
(This method is for dictionary developers) encode an AVP into Ipv4 value.
pub fn encode_ipv4_prefix(&self) -> Result<Vec<u8>, AVPError>
[src]
(This method is for dictionary developers) encode an AVP into Ipv4-prefix value.
pub fn encode_ipv6(&self) -> Result<Ipv6Addr, AVPError>
[src]
(This method is for dictionary developers) encode an AVP into Ipv6 value.
pub fn encode_ipv6_prefix(&self) -> Result<Vec<u8>, AVPError>
[src]
(This method is for dictionary developers) encode an AVP into Ipv6-prefix value.
pub fn encode_user_password(
&self,
secret: &[u8],
request_authenticator: &[u8]
) -> Result<Vec<u8>, AVPError>
[src]
&self,
secret: &[u8],
request_authenticator: &[u8]
) -> Result<Vec<u8>, AVPError>
(This method is for dictionary developers) encode an AVP into user-password value as bytes.
pub fn encode_date(&self) -> Result<DateTime<Utc>, AVPError>
[src]
(This method is for dictionary developers) encode an AVP into date value.
pub fn encode_tunnel_password(
&self,
secret: &[u8],
request_authenticator: &[u8]
) -> Result<(Vec<u8>, Tag), AVPError>
[src]
&self,
secret: &[u8],
request_authenticator: &[u8]
) -> Result<(Vec<u8>, Tag), AVPError>
(This method is for dictionary developers) encode an AVP into a tunnel-password value as bytes.
Trait Implementations
impl Clone for AVP
[src]
impl Debug for AVP
[src]
impl PartialEq<AVP> for AVP
[src]
impl StructuralPartialEq for AVP
[src]
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
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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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>,