[][src]Struct repository::EntityPtr

pub struct EntityPtr<T: Any, R = Repo> { /* fields omitted */ }

A pointer handle to a value in repository.

Implementations

impl<T: Any, R> EntityPtr<T, R>[src]

pub fn cast_repo<R2>(self) -> EntityPtr<T, R2>[src]

Convert entity pointer to work with another repository type.

impl<T: Any, R: AsRepoRef> EntityPtr<T, R>[src]

pub fn entity_id(self, repo: &R) -> Result<EntityId<R>, Error>[src]

Try to retrieve an index handle to the value.

pub fn get_ref(self, repo: &R) -> Result<&T, Error>[src]

Try to retrieve a reference to the value.

impl<T: Any, R: AsRepoMut> EntityPtr<T, R>[src]

pub fn get_mut(self, repo: &mut R) -> Result<&mut T, Error>[src]

Try to retrieve a mutable reference to the value.

Trait Implementations

impl<T: Any, R> Clone for EntityPtr<T, R>[src]

impl<T: Any, R> Copy for EntityPtr<T, R>[src]

impl<T: Any, R> Debug for EntityPtr<T, R>[src]

impl<T: Any, R> Eq for EntityPtr<T, R>[src]

impl<T: Any, R> Hash for EntityPtr<T, R>[src]

impl<T: Any, R> Ord for EntityPtr<T, R>[src]

impl<T: Any, R> PartialEq<EntityPtr<T, R>> for EntityPtr<T, R>[src]

impl<T: Any, R> PartialOrd<EntityPtr<T, R>> for EntityPtr<T, R>[src]

impl<T: Any, R> Send for EntityPtr<T, R>[src]

impl<T: Any, R> Sync for EntityPtr<T, R>[src]

Auto Trait Implementations

impl<T, R> RefUnwindSafe for EntityPtr<T, R> where
    R: RefUnwindSafe,
    T: RefUnwindSafe

impl<T, R> Unpin for EntityPtr<T, R>

impl<T, R> UnwindSafe for EntityPtr<T, R> where
    R: RefUnwindSafe,
    T: RefUnwindSafe

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> CallHasher for T where
    T: Hash

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.