pub struct AuthBlock {
pub level: AuthLevel,
pub session: SessionId,
pub signature: Signature,
}Expand description
Authentication block parsed from wire format
Fields§
§level: AuthLevelRequired authentication level
session: SessionIdSession identifier
signature: SignatureEd25519 signature over session + payload
Implementations§
Source§impl AuthBlock
impl AuthBlock
Sourcepub fn new(level: AuthLevel, session: SessionId, signature: Signature) -> Self
pub fn new(level: AuthLevel, session: SessionId, signature: Signature) -> Self
Create a new auth block
Sourcepub fn with_session(session: SessionId) -> Self
pub fn with_session(session: SessionId) -> Self
Create minimal auth block with just session
Sourcepub fn decode(data: &[u8]) -> ProtocolResult<Self>
pub fn decode(data: &[u8]) -> ProtocolResult<Self>
Decode auth block (without SO/SI markers)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AuthBlock
impl RefUnwindSafe for AuthBlock
impl Send for AuthBlock
impl Sync for AuthBlock
impl Unpin for AuthBlock
impl UnsafeUnpin for AuthBlock
impl UnwindSafe for AuthBlock
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