Preset

Trait Preset 

Source
pub trait Preset {
    // Required method
    fn apply(self, builder: Builder) -> Builder;
}
Expand description

A reusable bundle of endpoint Builder configuration.

Required Methods§

Source

fn apply(self, builder: Builder) -> Builder

Applies the configuration to the passed in Builder.

Implementations on Foreign Types§

Source§

impl Preset for Arc<TestTransport>

Available on crate feature unstable-custom-transports and (crate features test-utils) only.
Source§

fn apply(self, builder: Builder) -> Builder

Configures the builder with this transport and the network’s address lookup.

§Example
ⓘ
let network = TestNetwork::new();
let transport = network.create_transport(secret_key.public())?;
let ep = Endpoint::builder()
    .secret_key(secret_key)
    .preset(transport)
    .bind()
    .await?;

Implementors§

Source§

impl Preset for Empty

Source§

impl Preset for Minimal

Available on with_crypto_provider only.
Source§

impl Preset for N0

Available on with_crypto_provider only.
Source§

impl Preset for N0DisableRelay

Available on with_crypto_provider only.