Skip to main content

Config

Struct Config 

Source
pub struct Config { /* private fields */ }
Available on crate feature tls only.

Implementations§

Source§

impl Config

Source

pub fn new(identity: &Keypair) -> Result<Config, GenError>

Trait Implementations§

Source§

impl Clone for Config

Source§

fn clone(&self) -> Config

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<C> InboundConnectionUpgrade<C> for Config
where C: AsyncRead + AsyncWrite + Send + Unpin + 'static,

Source§

type Output = (PeerId, TlsStream<C>)

Output after the upgrade has been successfully negotiated and the handshake performed.
Source§

type Error = UpgradeError

Possible error during the handshake.
Source§

type Future = Pin<Box<dyn Future<Output = Result<<Config as InboundConnectionUpgrade<C>>::Output, <Config as InboundConnectionUpgrade<C>>::Error>> + Send>>

Future that performs the handshake with the remote.
Source§

fn upgrade_inbound( self, socket: C, _: <Config as UpgradeInfo>::Info, ) -> <Config as InboundConnectionUpgrade<C>>::Future

After we have determined that the remote supports one of the protocols we support, this method is called to start the handshake. Read more
Source§

impl<C> OutboundConnectionUpgrade<C> for Config
where C: AsyncRead + AsyncWrite + Send + Unpin + 'static,

Source§

type Output = (PeerId, TlsStream<C>)

Output after the upgrade has been successfully negotiated and the handshake performed.
Source§

type Error = UpgradeError

Possible error during the handshake.
Source§

type Future = Pin<Box<dyn Future<Output = Result<<Config as OutboundConnectionUpgrade<C>>::Output, <Config as OutboundConnectionUpgrade<C>>::Error>> + Send>>

Future that performs the handshake with the remote.
Source§

fn upgrade_outbound( self, socket: C, _: <Config as UpgradeInfo>::Info, ) -> <Config as OutboundConnectionUpgrade<C>>::Future

After we have determined that the remote supports one of the protocols we support, this method is called to start the handshake. Read more
Source§

impl UpgradeInfo for Config

Source§

type Info = &'static str

Opaque type representing a negotiable protocol.
Source§

type InfoIter = Once<<Config as UpgradeInfo>::Info>

Iterator returned by protocol_info.
Source§

fn protocol_info(&self) -> <Config as UpgradeInfo>::InfoIter

Returns the list of protocols that are supported. Used during the negotiation process.

Auto Trait Implementations§

§

impl !RefUnwindSafe for Config

§

impl !UnwindSafe for Config

§

impl Forget for Config

§

impl Freeze for Config
where *const ArcInner<CryptoProvider> is !null: Freeze, PhantomData<ArcInner<CryptoProvider>>: Freeze, *const ArcInner<dyn StoresServerSessions> is !null: Freeze, PhantomData<ArcInner<dyn StoresServerSessions>>: Freeze, *const ArcInner<dyn ProducesTickets> is !null: Freeze, PhantomData<ArcInner<dyn ProducesTickets>>: Freeze, *const ArcInner<dyn ResolvesServerCert> is !null: Freeze, PhantomData<ArcInner<dyn ResolvesServerCert>>: Freeze, *const u8 is !null: Freeze, PhantomData<Vec<u8>>: Freeze, &'static SupportedProtocolVersion: Freeze, *const ArcInner<dyn ClientCertVerifier> is !null: Freeze, PhantomData<ArcInner<dyn ClientCertVerifier>>: Freeze, *const ArcInner<dyn KeyLog> is !null: Freeze, PhantomData<ArcInner<dyn KeyLog>>: Freeze, *const ArcInner<dyn TimeProvider> is !null: Freeze, PhantomData<ArcInner<dyn TimeProvider>>: Freeze, PhantomData<&'static dyn CertCompressor>: Freeze, *const ArcInner<CompressionCache> is !null: Freeze, PhantomData<ArcInner<CompressionCache>>: Freeze, PhantomData<&'static dyn CertDecompressor>: Freeze, *const ArcInner<dyn ClientSessionStore> is !null: Freeze, PhantomData<ArcInner<dyn ClientSessionStore>>: Freeze, *const ArcInner<dyn ResolvesClientCert> is !null: Freeze, PhantomData<ArcInner<dyn ResolvesClientCert>>: Freeze, *const ArcInner<dyn ServerCertVerifier> is !null: Freeze, PhantomData<ArcInner<dyn ServerCertVerifier>>: Freeze, PhantomData<u8>: Freeze, PhantomData<NonEmpty>: Freeze, PhantomData<HpkeSymmetricCipherSuite>: Freeze, &'static str: Freeze, PhantomData<EchConfigExtension>: Freeze, PhantomData<MaybeEmpty>: Freeze, &'static dyn Hpke: Freeze,

§

impl Move for Config

§

impl Send for Config
where Arc<CryptoProvider>: Send, Arc<dyn StoresServerSessions>: Send, Arc<dyn ProducesTickets>: Send, Arc<dyn ResolvesServerCert>: Send, RawVecInner: Send, &'static SupportedProtocolVersion: Send, Arc<dyn ClientCertVerifier>: Send, Arc<dyn KeyLog>: Send, Arc<dyn TimeProvider>: Send, &'static dyn CertCompressor: Send, Arc<CompressionCache>: Send, &'static dyn CertDecompressor: Send, Arc<dyn ClientSessionStore>: Send, Arc<dyn ResolvesClientCert>: Send, Arc<dyn ServerCertVerifier>: Send, &'static str: Send, &'static [u8]: Send, &'static dyn Hpke: Send,

§

impl Sync for Config
where Arc<CryptoProvider>: Sync, Arc<dyn StoresServerSessions>: Sync, Arc<dyn ProducesTickets>: Sync, Arc<dyn ResolvesServerCert>: Sync, RawVecInner: Sync, Arc<dyn ClientCertVerifier>: Sync, Arc<dyn KeyLog>: Sync, Arc<dyn TimeProvider>: Sync, Arc<CompressionCache>: Sync, Arc<dyn ClientSessionStore>: Sync, Arc<dyn ResolvesClientCert>: Sync, Arc<dyn ServerCertVerifier>: Sync,

§

impl Unpin for Config
where Arc<CryptoProvider>: Unpin, Arc<dyn StoresServerSessions>: Unpin, Arc<dyn ProducesTickets>: Unpin, Arc<dyn ResolvesServerCert>: Unpin, *const u8 is !null: Unpin, &'static SupportedProtocolVersion: Unpin, Arc<dyn ClientCertVerifier>: Unpin, Arc<dyn KeyLog>: Unpin, Arc<dyn TimeProvider>: Unpin, &'static dyn CertCompressor: Unpin, Arc<CompressionCache>: Unpin, &'static dyn CertDecompressor: Unpin, Arc<dyn ClientSessionStore>: Unpin, Arc<dyn ResolvesClientCert>: Unpin, Arc<dyn ServerCertVerifier>: Unpin, &'static str: Unpin, &'static [u8]: Unpin, &'static dyn Hpke: Unpin,

§

impl UnsafeUnpin for Config
where *const ArcInner<CryptoProvider> is !null: UnsafeUnpin, PhantomData<ArcInner<CryptoProvider>>: UnsafeUnpin, *const ArcInner<dyn StoresServerSessions> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn StoresServerSessions>>: UnsafeUnpin, *const ArcInner<dyn ProducesTickets> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn ProducesTickets>>: UnsafeUnpin, *const ArcInner<dyn ResolvesServerCert> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn ResolvesServerCert>>: UnsafeUnpin, *const u8 is !null: UnsafeUnpin, PhantomData<Vec<u8>>: UnsafeUnpin, &'static SupportedProtocolVersion: UnsafeUnpin, *const ArcInner<dyn ClientCertVerifier> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn ClientCertVerifier>>: UnsafeUnpin, *const ArcInner<dyn KeyLog> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn KeyLog>>: UnsafeUnpin, *const ArcInner<dyn TimeProvider> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn TimeProvider>>: UnsafeUnpin, PhantomData<&'static dyn CertCompressor>: UnsafeUnpin, *const ArcInner<CompressionCache> is !null: UnsafeUnpin, PhantomData<ArcInner<CompressionCache>>: UnsafeUnpin, PhantomData<&'static dyn CertDecompressor>: UnsafeUnpin, *const ArcInner<dyn ClientSessionStore> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn ClientSessionStore>>: UnsafeUnpin, *const ArcInner<dyn ResolvesClientCert> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn ResolvesClientCert>>: UnsafeUnpin, *const ArcInner<dyn ServerCertVerifier> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn ServerCertVerifier>>: UnsafeUnpin, PhantomData<u8>: UnsafeUnpin, PhantomData<NonEmpty>: UnsafeUnpin, PhantomData<HpkeSymmetricCipherSuite>: UnsafeUnpin, &'static str: UnsafeUnpin, PhantomData<EchConfigExtension>: UnsafeUnpin, PhantomData<MaybeEmpty>: UnsafeUnpin, &'static dyn Hpke: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> UpgradeInfoSend for T
where T: UpgradeInfo + Send + 'static, <T as UpgradeInfo>::Info: Send + 'static, <<T as UpgradeInfo>::InfoIter as IntoIterator>::IntoIter: Send + 'static,

§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more