[−][src]Enum onc_rpc::auth::AuthFlavor
A set of basic auth flavor types described in RFC 5531.
The deprecated AUTH_DH
is not supported, nor is GSS.
Variants (Non-exhaustive)
AuthNone(Option<T>)
AUTH_NONE
with the opaque data the spec allows to be included
(typically None
).
AuthUnix(AuthUnixParams<T>)
AUTH_UNIX
and the fields it contains.
`AUTH_SHORT and its opaque identifier
An authentication credential unknown to this library, but possibly valid and acceptable by the server.
Fields of Unknown
id: u32
The discriminator for this auth type.
data: T
The opaque data contained within the this flavor.
Implementations
impl<T> AuthFlavor<T> where
T: AsRef<[u8]>,
[src]
T: AsRef<[u8]>,
pub fn serialise_into(&self, buf: &mut Cursor<Vec<u8>>) -> Result<(), Error>
[src]
Serialises this auth flavor and writes it into buf.
pub fn id(&self) -> u32
[src]
Returns the ID value used to identify the variant in the wire protocol.
pub fn associated_data_len(&self) -> u32
[src]
Returns the byte length of the associated auth data, if any.
pub fn serialised_len(&self) -> u32
[src]
Returns the on-wire length of this auth flavor once serialised, including discriminator and length values.
Trait Implementations
impl<T: Debug> Debug for AuthFlavor<T> where
T: AsRef<[u8]>,
[src]
T: AsRef<[u8]>,
impl<T: PartialEq> PartialEq<AuthFlavor<T>> for AuthFlavor<T> where
T: AsRef<[u8]>,
[src]
T: AsRef<[u8]>,
pub fn eq(&self, other: &AuthFlavor<T>) -> bool
[src]
pub fn ne(&self, other: &AuthFlavor<T>) -> bool
[src]
impl<T> StructuralPartialEq for AuthFlavor<T> where
T: AsRef<[u8]>,
[src]
T: AsRef<[u8]>,
impl<'a> TryFrom<&'a [u8]> for AuthFlavor<&'a [u8]>
[src]
type Error = Error
The type returned in the event of a conversion error.
pub fn try_from(v: &'a [u8]) -> Result<Self, Self::Error>
[src]
impl TryFrom<Bytes> for AuthFlavor<Bytes>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for AuthFlavor<T> where
T: RefUnwindSafe,
[src]
T: RefUnwindSafe,
impl<T> Send for AuthFlavor<T> where
T: Send,
[src]
T: Send,
impl<T> Sync for AuthFlavor<T> where
T: Sync,
[src]
T: Sync,
impl<T> Unpin for AuthFlavor<T> where
T: Unpin,
[src]
T: Unpin,
impl<T> UnwindSafe for AuthFlavor<T> where
T: UnwindSafe,
[src]
T: UnwindSafe,
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>,