[][src]Trait zc::Owner

pub trait Owner: Sized + 'static {
    type Storage: Storage;
    pub fn into_storage(self) -> Self::Storage;
pub fn from_storage(storage: Self::Storage) -> Self; }

Represents the owner of data with an associated storage type.

An Owner is a convenience trait that can be implemented without the need of unsafe that returns a Storage that does require an unsafe implementation. See the notes on Storage to see why this it is required.

Associated Types

type Storage: Storage[src]

The Storage type the owner uses.

Loading content...

Required methods

pub fn into_storage(self) -> Self::Storage[src]

Consumes the Owner into the associated Storage type.

pub fn from_storage(storage: Self::Storage) -> Self[src]

Consumes the associated Storage into the Owner type.

Loading content...

Implementations on Foreign Types

impl Owner for String[src]

type Storage = AliasableString

impl<T: 'static> Owner for Vec<T>[src]

type Storage = AliasableVec<T>

Loading content...

Implementors

impl<T> Owner for T where
    T: Storage
[src]

type Storage = T

Loading content...