pub struct ProtectedSession<'a, 's, B: Bearer> { /* private fields */ }Implementations§
Source§impl<'a, 's, B: Bearer> ProtectedSession<'a, 's, B>
impl<'a, 's, B: Bearer> ProtectedSession<'a, 's, B>
Sourcepub fn attach(
channel: &'s mut ProtectedChannel<'a, B>,
pins: &'s PinAuthority,
clock: &'s dyn Fn() -> u64,
deadline: u64,
role: u8,
owner: &'s mut SessionOwner,
) -> Result<Self, Error>
pub fn attach( channel: &'s mut ProtectedChannel<'a, B>, pins: &'s PinAuthority, clock: &'s dyn Fn() -> u64, deadline: u64, role: u8, owner: &'s mut SessionOwner, ) -> Result<Self, Error>
Construct only from an established channel. The transcript is the handshake value; arbitrary digest bytes cannot manufacture this session.
pub fn closed(&self) -> bool
Trait Implementations§
Source§impl<B: Bearer> ServiceIo for ProtectedSession<'_, '_, B>
impl<B: Bearer> ServiceIo for ProtectedSession<'_, '_, B>
fn send_message(&mut self, header: &Header, body: &[u8]) -> Result<(), Error>
fn recv_control(&mut self) -> Result<(Header, [u8; 80], usize), Error>
fn recv_describe(&mut self) -> Result<(Header, [u8; 96], usize), Error>
fn recv_descriptor(&mut self, page: &mut [u8]) -> Result<(Header, usize), Error>
fn recv_leaf( &mut self, payload: &mut [u8], proof: &mut [u8], ) -> Result<(Header, usize, usize), Error>
fn fail_close(&mut self, e: Error) -> Error
fn closed(&self) -> bool
fn next_transfer_id(&mut self) -> Result<[u8; 16], Error>
fn next_credit_serial(&mut self) -> Result<u64, Error>
Auto Trait Implementations§
impl<'a, 's, B> !RefUnwindSafe for ProtectedSession<'a, 's, B>
impl<'a, 's, B> !Send for ProtectedSession<'a, 's, B>
impl<'a, 's, B> !Sync for ProtectedSession<'a, 's, B>
impl<'a, 's, B> !UnwindSafe for ProtectedSession<'a, 's, B>
impl<'a, 's, B> Freeze for ProtectedSession<'a, 's, B>
impl<'a, 's, B> Unpin for ProtectedSession<'a, 's, B>
impl<'a, 's, B> UnsafeUnpin for ProtectedSession<'a, 's, B>
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more