pub struct ClientConfig {
    pub interfaces: Option<InterfaceImplementations>,
    pub envs: Option<HashMap<Uri, Vec<u8>>>,
    pub wrappers: Option<Vec<(Uri, Arc<dyn Wrapper>)>>,
    pub packages: Option<Vec<(Uri, Arc<dyn WrapPackage>)>>,
    pub redirects: Option<HashMap<Uri, Uri>>,
    pub resolvers: Option<Vec<Arc<dyn UriResolver>>>,
}
Expand description

Struct representing the configuration of a Client.

Fields§

§interfaces: Option<InterfaceImplementations>§envs: Option<HashMap<Uri, Vec<u8>>>§wrappers: Option<Vec<(Uri, Arc<dyn Wrapper>)>>§packages: Option<Vec<(Uri, Arc<dyn WrapPackage>)>>§redirects: Option<HashMap<Uri, Uri>>§resolvers: Option<Vec<Arc<dyn UriResolver>>>

Implementations§

Trait Implementations§

source§

impl ClientConfigBuilder for ClientConfig

source§

fn add(&mut self, config: ClientConfig) -> &mut Self

Merges a ClientConfig with the current instance’s state. Read more
source§

fn add_env(&mut self, uri: Uri, env: Vec<u8>) -> &mut Self

Adds an environment configuration entry. Read more
source§

fn add_envs(&mut self, envs: HashMap<Uri, Vec<u8>>) -> &mut Self

Adds several environment configuration entries. Read more
source§

fn remove_env(&mut self, uri: &Uri) -> &mut Self

Removes an environment entry by Uri. Read more
source§

fn add_interface_implementation( &mut self, interface_uri: Uri, implementation_uri: Uri ) -> &mut Self

Adds an interface implementation entry. Read more
source§

fn add_interface_implementations( &mut self, interface_uri: Uri, implementation_uris: Vec<Uri> ) -> &mut Self

Adds several interface implementations. Read more
source§

fn remove_interface_implementation( &mut self, interface_uri: &Uri, implementation_uri: &Uri ) -> &mut Self

Removes an implementation from an interface. Read more
source§

fn add_wrapper(&mut self, uri: Uri, wrapper: Arc<dyn Wrapper>) -> &mut Self

Embeds a wrapper to the config. When invoking this wrapper’s Uri, it won’t be fetched at runtime; but taken from the config instead. Read more
source§

fn add_wrappers(&mut self, wrappers: Vec<(Uri, Arc<dyn Wrapper>)>) -> &mut Self

Embeds several wrappers to the config. Read more
source§

fn remove_wrapper(&mut self, uri: &Uri) -> &mut Self

Removes an embedded wrapper. Read more
source§

fn add_package(&mut self, uri: Uri, package: Arc<dyn WrapPackage>) -> &mut Self

Embeds a WrapPackage to the config. When invoking this package’s Uri, the embedded local instance will create a Wrapper and invoke it. Read more
source§

fn add_packages( &mut self, packages: Vec<(Uri, Arc<dyn WrapPackage>)> ) -> &mut Self

Embeds several WrapPackages to the config. Read more
source§

fn remove_package(&mut self, uri: &Uri) -> &mut Self

Removes an embedded WrapPackage. Read more
source§

fn add_redirect(&mut self, from: Uri, to: Uri) -> &mut Self

Specifies a Uri that should be redirected to another Uri. Read more
source§

fn add_redirects(&mut self, redirects: HashMap<Uri, Uri>) -> &mut Self

Specifies multiple Uris that should be redirected to other Uris. Read more
source§

fn remove_redirect(&mut self, from: &Uri) -> &mut Self

Removes a previously added redirect from one Uri to another. Read more
source§

fn add_resolver(&mut self, resolver: Arc<dyn UriResolver>) -> &mut Self

Adds a custom Uri resolver to the configuration. Read more
source§

fn add_resolvers(&mut self, resolvers: Vec<Arc<dyn UriResolver>>) -> &mut Self

Adds multiple custom Uri resolvers to the configuration. Read more
source§

impl Clone for ClientConfig

source§

fn clone(&self) -> ClientConfig

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl CoreClientConfigBuilder for ClientConfig

source§

fn build(self) -> CoreClientConfig

Builds a CoreClientConfig instance.
source§

impl Default for ClientConfig

source§

fn default() -> ClientConfig

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

impl Into<CoreClientConfig> for ClientConfig

source§

fn into(self) -> CoreClientConfig

Converts this type into the (usually inferred) input type.

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
§

impl<T> ArchivePointee for T

§

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.
§

fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.
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<F, W, T, D> Deserialize<With<T, W>, D> for F
where W: DeserializeWith<F, T, D>, D: Fallible + ?Sized, F: ?Sized,

§

fn deserialize( &self, deserializer: &mut D ) -> Result<With<T, W>, <D as Fallible>::Error>

Deserializes using the given deserializer
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.

§

impl<T> LayoutRaw for T

§

fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>

Gets the layout of the type.
§

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> Pointee for T

§

type Metadata = ()

The type for metadata in pointers and references to Self.
source§

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

§

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>,

§

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>,

§

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> Upcastable for T
where T: Any + Send + Sync + 'static,

§

fn upcast_any_ref(&self) -> &(dyn Any + 'static)

upcast ref
§

fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)

upcast mut ref
§

fn upcast_any_box(self: Box<T>) -> Box<dyn Any>

upcast boxed dyn
§

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