Struct arc_swap::access::Map[][src]

pub struct Map<A, T, F> { /* fields omitted */ }
Expand description

An adaptor to provide access to a part of larger structure.

This is the active part of this module. Use the module documentation for the details.

Implementations

Creates a new instance.

Parameters
  • access: Access to the bigger structure. This is usually something like Arc<ArcSwap> or &ArcSwap. It is technically possible to use any other Access here, though, for example to sub-delegate into even smaller structure from a Map (or generic Access).
  • projection: A function (or closure) responsible to providing a reference into the bigger bigger structure, selecting just subset of it. In general, it is expected to be cheap (like only taking reference).

Trait Implementations

A guard object containing the value and keeping it alive. Read more

The loading method. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

The equivalent of Access::load.

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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.