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§
Implementations§
source§impl 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<Session>
.
If a Session is created from the NoneHandle then the returned value from the function will be None.
Trait Implementations§
source§impl Clone for AuthSession
impl Clone for AuthSession
source§fn clone(&self) -> AuthSession
fn clone(&self) -> AuthSession
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for AuthSession
impl Debug for AuthSession
source§impl From<AuthSession> for SessionHandle
impl From<AuthSession> for SessionHandle
source§fn from(auth_session: AuthSession) -> SessionHandle
fn from(auth_session: AuthSession) -> SessionHandle
Converts to this type from the input type.
source§impl From<HmacSession> for AuthSession
impl From<HmacSession> for AuthSession
source§fn from(hmac_session: HmacSession) -> AuthSession
fn from(hmac_session: HmacSession) -> AuthSession
Converts to this type from the input type.
source§impl From<PolicySession> for AuthSession
impl From<PolicySession> for AuthSession
source§fn from(policy_session: PolicySession) -> AuthSession
fn from(policy_session: PolicySession) -> AuthSession
Converts to this type from the input type.
source§impl PartialEq for AuthSession
impl PartialEq for AuthSession
source§fn 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 ==
.source§impl TryFrom<AuthSession> for HmacSession
impl TryFrom<AuthSession> for HmacSession
source§fn try_from(auth_session: AuthSession) -> Result<HmacSession>
fn try_from(auth_session: AuthSession) -> Result<HmacSession>
Performs the conversion.
source§impl TryFrom<AuthSession> for PolicySession
impl TryFrom<AuthSession> for PolicySession
source§fn try_from(auth_session: AuthSession) -> Result<PolicySession>
fn try_from(auth_session: AuthSession) -> Result<PolicySession>
Performs the conversion.
impl Copy for AuthSession
impl Eq for AuthSession
impl StructuralPartialEq for AuthSession
Auto Trait Implementations§
impl Freeze for AuthSession
impl RefUnwindSafe for AuthSession
impl Send for AuthSession
impl Sync for AuthSession
impl Unpin for AuthSession
impl UnwindSafe for AuthSession
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more