[][src]Struct remote_trait_object::raw_exchange::Skeleton

pub struct Skeleton { /* fields omitted */ }

An opaque service to register in the context.

See the general description of the concept skeleton here and the definition in this crate here.

It is constructed with a service object with whichever smart pointer you want. Depending on use of &mut self in the methods in the service trait, some or all Box<>, Arc<>, Arc<RwLock<>> will implement IntoSkeleton automatically by the proc macro. Please see this section for more detail about smart pointers.

Skeleton is useful when you want to erase the trait, and hold it as an opaque service that will be registered later.

Note that you will never need this if you do only plain export & import using ServiceRef, ServiceToExport, or ServiceToImport. See the module-level documentation to understand when to use this.

Implementations

impl Skeleton[src]

pub fn new<T: ?Sized + Service>(service: impl IntoSkeleton<T>) -> Self[src]

Trait Implementations

impl Clone for Skeleton[src]

pub fn clone(&self) -> Self[src]

Clones a Skeleton, while sharing the actual single service object.

This is useful when you want to export a single service object to multiple connections.

impl Debug for Skeleton[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.