Trait qecs_core::StoreBase [] [src]

pub trait StoreBase: Any + Send + Sync {
    type Id: Id;
    fn len(&self) -> usize;
    fn is_assigned<'id>(&self, id: Valid<'id, Self::Id>) -> bool;
    fn assign_cloned<'id>(&mut self, dest: Valid<'id, Self::Id>, src: Valid<'id, Self::Id>) -> bool;
    fn release_drop<'id>(&mut self, id: Valid<'id, Self::Id>) -> bool;
    fn clear(&mut self);
}

Associated Types

type Id: Id

Required Methods

fn len(&self) -> usize

fn is_assigned<'id>(&self, id: Valid<'id, Self::Id>) -> bool

fn assign_cloned<'id>(&mut self, dest: Valid<'id, Self::Id>, src: Valid<'id, Self::Id>) -> bool

fn release_drop<'id>(&mut self, id: Valid<'id, Self::Id>) -> bool

A variant of .release(id) which drops the returned component. Returns true if sucessful.

fn clear(&mut self)

Methods

impl<ID: Id> StoreBase<Id=ID>
[src]

fn is<__T>(&self) -> bool where __T: Any, Self: Downcast<__T>

unsafe fn unchecked_downcast_ref<__T>(&self) -> &__T where __T: Any, Self: Downcast<__T>

fn downcast_ref<__T>(&self) -> Option<&__T> where __T: Any, Self: Downcast<__T>

unsafe fn unchecked_downcast_mut<__T>(&mut self) -> &mut __T where __T: Any, Self: Downcast<__T>

fn downcast_mut<__T>(&mut self) -> Option<&mut __T> where __T: Any, Self: Downcast<__T>

fn downcast_boxed<__T>(self: Box<Self>) -> Result<Box<__T>, Box<Self>> where __T: Any, Self: Downcast<__T>

Trait Implementations

impl<ID: Id, T: StoreBase<Id=ID>> Downcast<T> for StoreBase<Id=ID>
[src]

fn is_type(&self) -> bool

unsafe fn unchecked_downcast_ref(&self) -> &T

fn downcast_ref(&self) -> Option<&T>

unsafe fn unchecked_downcast_mut(&mut self) -> &mut T

fn downcast_mut(&mut self) -> Option<&mut T>

fn downcast_boxed(self: Box<Self>) -> Result<Box<T>, Box<Self>>

Implementors