pub struct Context<S, P> { /* private fields */ }Expand description
Inputs that start a dialer or listener: the namespace, timing bounds, identities, and Version.
Implementations§
Source§impl<S, P> Context<S, P>
impl<S, P> Context<S, P>
Sourcepub fn new(
namespace: &[u8],
current_time_ms: u64,
ok_timestamps: Range<u64>,
my_identity: S,
peer_identity: P,
version: Version,
) -> Self
pub fn new( namespace: &[u8], current_time_ms: u64, ok_timestamps: Range<u64>, my_identity: S, peer_identity: P, version: Version, ) -> Self
Creates a context from the application namespace, the local time, the accepted range of peer timestamps (both in milliseconds), the local signer, the expected peer identity, and the Version.
Auto Trait Implementations§
impl<S, P> Freeze for Context<S, P>
impl<S, P> RefUnwindSafe for Context<S, P>where
S: RefUnwindSafe,
P: RefUnwindSafe,
impl<S, P> Send for Context<S, P>
impl<S, P> Sync for Context<S, P>
impl<S, P> Unpin for Context<S, P>
impl<S, P> UnsafeUnpin for Context<S, P>where
S: UnsafeUnpin,
P: UnsafeUnpin,
impl<S, P> UnwindSafe for Context<S, P>where
S: UnwindSafe,
P: UnwindSafe,
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