Struct rscontainer::Shared[][src]

#[repr(transparent)]
pub struct Shared<S: ?Sized + IShared> { /* fields omitted */ }
Expand description

A pointer to a shared instance from the service container.

Implementations

Creates a shared instance from the inner smart pointer.

Returns the inner smart pointer of the shared instance.

Returns a reference to the inner smart pointer.

Returns a reference to the inner smart pointer.

Returns true if two shared instances point to the same instance.

Only compares the pointers, not the contents of the shared instances, and is therefore always cheap.

Get access to the shared instance through a closure.

Get access to the shared instance through a closure.

Get access to the shared instance through a closure.

Get access to the shared instance through a closure.

Trait Implementations

Clones the pointer to the shared instance.

Only increases the reference count, so this is very cheap. See Rc::clone and Arc::clone.

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

The resulting type after dereferencing.

Dereferences the value.

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

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.