pub enum AuthSession {
HmacSession(HmacSession),
PolicySession(PolicySession),
Password,
}
Expand description
Enum representing an authorization session interface type
Details
This corresponds to TPMI_SH_AUTH_SESSION but provides more information regarding the parameters used when the AuthSession was created.
Variants
HmacSession(HmacSession)
PolicySession(PolicySession)
Password
Implementations
sourceimpl AuthSession
impl AuthSession
sourcepub fn create(
session_type: SessionType,
session_handle: SessionHandle,
auth_hash: HashingAlgorithm
) -> Option<AuthSession>
pub fn create(
session_type: SessionType,
session_handle: SessionHandle,
auth_hash: HashingAlgorithm
) -> Option<AuthSession>
Function that creates a Option
If a Session is created from the NoneHandle then the returned value from the function will be None.
Trait Implementations
sourceimpl Clone for AuthSession
impl Clone for AuthSession
sourcefn clone(&self) -> AuthSession
fn clone(&self) -> AuthSession
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for AuthSession
impl Debug for AuthSession
sourceimpl From<AuthSession> for SessionHandle
impl From<AuthSession> for SessionHandle
sourcefn from(auth_session: AuthSession) -> SessionHandle
fn from(auth_session: AuthSession) -> SessionHandle
Performs the conversion.
sourceimpl From<HmacSession> for AuthSession
impl From<HmacSession> for AuthSession
sourcefn from(hmac_session: HmacSession) -> AuthSession
fn from(hmac_session: HmacSession) -> AuthSession
Performs the conversion.
sourceimpl From<PolicySession> for AuthSession
impl From<PolicySession> for AuthSession
sourcefn from(policy_session: PolicySession) -> AuthSession
fn from(policy_session: PolicySession) -> AuthSession
Performs the conversion.
sourceimpl PartialEq<AuthSession> for AuthSession
impl PartialEq<AuthSession> for AuthSession
sourcefn eq(&self, other: &AuthSession) -> bool
fn eq(&self, other: &AuthSession) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &AuthSession) -> bool
fn ne(&self, other: &AuthSession) -> bool
This method tests for !=
.
sourceimpl TryFrom<AuthSession> for PolicySession
impl TryFrom<AuthSession> for PolicySession
sourcefn try_from(auth_session: AuthSession) -> Result<PolicySession>
fn try_from(auth_session: AuthSession) -> Result<PolicySession>
Performs the conversion.
sourceimpl TryFrom<AuthSession> for HmacSession
impl TryFrom<AuthSession> for HmacSession
sourcefn try_from(auth_session: AuthSession) -> Result<HmacSession>
fn try_from(auth_session: AuthSession) -> Result<HmacSession>
Performs the conversion.
impl Copy for AuthSession
impl Eq for AuthSession
impl StructuralEq for AuthSession
impl StructuralPartialEq for AuthSession
Auto Trait Implementations
impl RefUnwindSafe for AuthSession
impl Send for AuthSession
impl Sync for AuthSession
impl Unpin for AuthSession
impl UnwindSafe for AuthSession
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more