NetworkFacadeBuilder

Struct NetworkFacadeBuilder 

Source
pub struct NetworkFacadeBuilder { /* private fields */ }
Expand description

Builder for NetworkFacade

Implementations§

Source§

impl NetworkFacadeBuilder

Source

pub fn new() -> Self

Create a new builder with default configuration

Source

pub fn with_preset(self, preset: NetworkPreset) -> Self

Use a preset configuration

Source

pub fn with_preset_mobile(self) -> Self

Use mobile preset

Source

pub fn with_preset_iot(self) -> Self

Use IoT preset

Source

pub fn with_preset_low_memory(self) -> Self

Use low-memory preset

Source

pub fn with_preset_high_performance(self) -> Self

Use high-performance preset

Source

pub fn with_preset_privacy(self) -> Self

Use privacy preset

Source

pub fn with_config(self, config: NetworkConfig) -> Self

Set custom network configuration

Source

pub fn with_semantic_dht(self) -> Self

Enable semantic DHT

Source

pub fn with_semantic_dht_config(self, config: SemanticDhtConfig) -> Self

Enable semantic DHT with custom config

Source

pub fn with_gossipsub(self) -> Self

Enable GossipSub

Source

pub fn with_gossipsub_config(self, config: GossipSubConfig) -> Self

Enable GossipSub with custom config

Source

pub fn with_geo_routing(self) -> Self

Enable geographic routing

Source

pub fn with_geo_routing_config(self, config: GeoRouterConfig) -> Self

Enable geographic routing with custom config

Source

pub fn with_quality_predictor(self) -> Self

Enable quality prediction

Source

pub fn with_quality_predictor_config( self, config: QualityPredictorConfig, ) -> Self

Enable quality prediction with custom config

Source

pub fn with_peer_selector(self) -> Self

Enable intelligent peer selection

Source

pub fn with_peer_selector_config(self, config: PeerSelectorConfig) -> Self

Enable intelligent peer selection with custom config

Source

pub fn with_multipath_quic(self) -> Self

Enable multipath QUIC

Source

pub fn with_multipath_quic_config(self, config: MultipathConfig) -> Self

Enable multipath QUIC with custom config

Source

pub fn with_tor(self) -> Self

Enable Tor integration

Source

pub fn with_tor_config(self, config: TorConfig) -> Self

Enable Tor with custom config

Source

pub fn with_bandwidth_throttle(self) -> Self

Enable bandwidth throttling

Source

pub fn with_bandwidth_throttle_config(self, config: ThrottleConfig) -> Self

Enable bandwidth throttling with custom config

Source

pub fn with_adaptive_polling(self) -> Self

Enable adaptive polling

Source

pub fn with_adaptive_polling_config(self, config: AdaptivePollingConfig) -> Self

Enable adaptive polling with custom config

Source

pub fn with_background_mode(self) -> Self

Enable background mode

Source

pub fn with_background_mode_config(self, config: BackgroundModeConfig) -> Self

Enable background mode with custom config

Source

pub fn with_offline_queue(self) -> Self

Enable offline queue

Source

pub fn with_offline_queue_config(self, config: OfflineQueueConfig) -> Self

Enable offline queue with custom config

Source

pub fn with_memory_monitor(self) -> Self

Enable memory monitoring

Source

pub fn with_memory_monitor_config(self, config: MemoryMonitorConfig) -> Self

Enable memory monitoring with custom config

Source

pub fn with_network_monitor(self) -> Self

Enable network monitoring

Source

pub fn with_network_monitor_config(self, config: NetworkMonitorConfig) -> Self

Enable network monitoring with custom config

Source

pub fn with_query_batcher(self) -> Self

Enable query batching

Source

pub fn with_query_batcher_config(self, config: QueryBatcherConfig) -> Self

Enable query batching with custom config

Source

pub fn build(self) -> Result<NetworkFacade>

Build the network facade

Trait Implementations§

Source§

impl Default for NetworkFacadeBuilder

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

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

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

Source§

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

Source§

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

Source§

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

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

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

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

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

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

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

Initializes a with the given initializer. Read more
Source§

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

Dereferences the given pointer. Read more
Source§

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

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

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

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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

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

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

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

fn with_current_subscriber(self) -> WithDispatch<Self>

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

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,