pub struct Proven<I: Identity> { /* private fields */ }Expand description
A chain whose peer has proven possession — §6.1’s stage 2, at 2 DH cumulative.
Drop is a silent reject.
S8 — #[must_use], see Intro. S9 is the story that makes this
stage’s drop meaningful: prove an identity, then still decline.
Implementations§
Source§impl<I: Identity> Proven<I>
impl<I: Identity> Proven<I>
Sourcepub fn peer_static(&self) -> &PublicKeyOf<I>
pub fn peer_static(&self) -> &PublicKeyOf<I>
The peer’s static — proven, and safe to authorise or deny on.
Sourcepub fn timestamp(&self) -> Timestamp
pub fn timestamp(&self) -> Timestamp
§5.2’s initiation timestamp, as the peer sent it.
The one wall-clock reading in the protocol (§5.3), carried verbatim: it is not range-checked, because §5.3 specifies no validation and a slither that rejected an out-of-range value would have added a wire behaviour the spec does not have.
Sourcepub async fn accept(self) -> Result<Connection<I::Suite>, AcceptError>
pub async fn accept(self) -> Result<Connection<I::Suite>, AcceptError>
§6.1’s stage 3 — +2 DH (ee, se), 4 cumulative.
Writes msg2 and installs the session, returning the established
Connection.
§Cancel-safety
Dropping the future before the reply arrives rejects the chain (a
no-op if the driver has already consumed it). Dropping it after
the driver has built the connection drops that Connection — the
last handle to it — which performs §16.2’s close(NO_ERROR, "").
That is the right answer for a session nobody claimed: the peer is
told at once rather than waiting out its representable
effective-dead-timeout deadline.
Trait Implementations§
Auto Trait Implementations§
impl<I> !RefUnwindSafe for Proven<I>
impl<I> !Send for Proven<I>
impl<I> !Sync for Proven<I>
impl<I> !UnwindSafe for Proven<I>
impl<I> Freeze for Proven<I>
impl<I> Unpin for Proven<I>
impl<I> UnsafeUnpin for Proven<I>where
Shell<I>: UnsafeUnpin,
<<<I as Identity>::Suite as Channel>::Curve as Curve>::PublicKey: UnsafeUnpin,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<P> ProviderExt for P
impl<P> ProviderExt for P
Source§fn generate<C>(
&mut self,
) -> Result<<P as CryptoKeyProvider<C>>::PrivateKey, <P as CryptoKeyProvider<C>>::Error>where
C: Curve,
P: CryptoKeyProvider<C>,
fn generate<C>(
&mut self,
) -> Result<<P as CryptoKeyProvider<C>>::PrivateKey, <P as CryptoKeyProvider<C>>::Error>where
C: Curve,
P: CryptoKeyProvider<C>,
C.Source§fn generate_ephemeral<C>(
&mut self,
) -> Result<<P as CryptoKeyProvider<C>>::PrivateKey, <P as CryptoKeyProvider<C>>::Error>where
C: Curve,
P: CryptoKeyProvider<C>,
fn generate_ephemeral<C>(
&mut self,
) -> Result<<P as CryptoKeyProvider<C>>::PrivateKey, <P as CryptoKeyProvider<C>>::Error>where
C: Curve,
P: CryptoKeyProvider<C>,
C.