Struct ResumptionHint Copy item path Source #[non_exhaustive]
pub struct ResumptionHint {
pub session_id: Vec <u8 >,
pub resumption_secret: Vec <u8 >,
}Expand description 0-RTT resumption material extracted from a completed session.
Produced by PhantomSession::resumption_hint after a handshake
completes, and fed back into connect_pinned_with_resumption to
attempt a 0-RTT reconnect to the same server.
Both fields are exactly 32 bytes — this record is the
UniFFI-representable surface for the internal (session_id, resumption_secret) tuple. The fields are Vec<u8> because UniFFI
has no fixed-size-array type, so the length is a runtime invariant
checked when the hint is used.
Store the hint alongside the pinned HybridVerifyingKey of the
server it was negotiated against: the resumption_secret is
server-pinned, and reusing a hint across servers is a configuration
bug.
This struct is marked as non-exhaustive Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
The negotiated session id (32 bytes).
The resumption secret (32 bytes) — sensitive; treat like a key.
Performs copy-assignment from
source.
Read more Formats the value using the given formatter.
Read more The low-level type used for passing values of this type over the FFI.
Read more Lower a rust value of the target type, into an FFI value of type Self::FfiType.
Read more Lift a rust value of the target type, from an FFI value of type Self::FfiType.
Read more Write a rust value into a buffer, to send over the FFI in serialized form.
Read more Read a rust value from a buffer, received over the FFI in serialized form.
Read more FFI return type for trait interfaces
Lift a successfully returned value from a trait interface
Lift a foreign returned value from a trait interface
Read more Lift a Rust value for a callback interface method error result
Read more Lift a Rust value for an unexpected callback interface error
Read more Lower this value for scaffolding function return
Read more The type that should be returned by scaffolding functions for this type.
Read more Lower the return value from an scaffolding call
Read more Lower the return value for failed argument lifts
Read more Immutably borrows from an owned value.
Read more Mutably borrows from an owned value.
Read more 🔬 This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from
self to
dest.
Read more Returns the argument unchanged.
Create a new handle for an Arc value
Read more Consume a handle, getting back the initial
Arc<> Read more Get a clone of the
Arc<> using a “borrowed” handle.
Read more Instruments this type with the provided
Span, returning an
Instrumented wrapper.
Read more Calls U::from(self).
That is, this conversion is whatever the implementation of
From <T> for U chooses to do.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning.
Read more Uses borrowed data to replace owned data, usually by cloning.
Read more The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.