pub struct GeneratorClerk<Index, G: DataGenerator<Index>> { /* private fields */ }Expand description
An implementation of DataClerk for data generators
Implementations§
Source§impl<Index: Default, G: DataGenerator<Index>> GeneratorClerk<Index, G>
impl<Index: Default, G: DataGenerator<Index>> GeneratorClerk<Index, G>
Trait Implementations§
Source§impl<Index: DataKey, G: DataGenerator<Index>> DataClerk<Index> for GeneratorClerk<Index, G>
impl<Index: DataKey, G: DataGenerator<Index>> DataClerk<Index> for GeneratorClerk<Index, G>
Source§type Token = Token<<GeneratorClerk<Index, G> as DataClerk<Index>>::Key, <GeneratorClerk<Index, G> as DataClerk<Index>>::Item>
type Token = Token<<GeneratorClerk<Index, G> as DataClerk<Index>>::Key, <GeneratorClerk<Index, G> as DataClerk<Index>>::Item>
Token type Read more
Source§fn update(
&mut self,
_: &mut ConfigCx<'_>,
_: Id,
_: Range<Index>,
data: &Self::Data,
) -> DataChanges<Index>
fn update( &mut self, _: &mut ConfigCx<'_>, _: Id, _: Range<Index>, data: &Self::Data, ) -> DataChanges<Index>
Update the clerk Read more
Source§fn len(&self, data: &Self::Data, lbound: Index) -> DataLen<Index>
fn len(&self, data: &Self::Data, lbound: Index) -> DataLen<Index>
Get the number of indexable items Read more
Source§fn update_token(
&self,
data: &Self::Data,
index: Index,
update_item: bool,
token: &mut Option<Self::Token>,
) -> TokenChanges
fn update_token( &self, data: &Self::Data, index: Index, update_item: bool, token: &mut Option<Self::Token>, ) -> TokenChanges
Update a token for the given
index Read moreSource§fn item<'r>(
&'r self,
_: &'r Self::Data,
token: &'r Self::Token,
) -> &'r Self::Item
fn item<'r>( &'r self, _: &'r Self::Data, token: &'r Self::Token, ) -> &'r Self::Item
Get the data item for the given
token Read moreAuto Trait Implementations§
impl<Index, G> Freeze for GeneratorClerk<Index, G>where
G: Freeze,
impl<Index, G> RefUnwindSafe for GeneratorClerk<Index, G>where
G: RefUnwindSafe,
Index: RefUnwindSafe,
impl<Index, G> Send for GeneratorClerk<Index, G>
impl<Index, G> Sync for GeneratorClerk<Index, G>
impl<Index, G> Unpin for GeneratorClerk<Index, G>
impl<Index, G> UnwindSafe for GeneratorClerk<Index, G>where
G: UnwindSafe,
Index: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<S, T> CastApprox<T> for Swhere
T: ConvApprox<S>,
impl<S, T> CastApprox<T> for Swhere
T: ConvApprox<S>,
Source§fn try_cast_approx(self) -> Result<T, Error>
fn try_cast_approx(self) -> Result<T, Error>
Source§fn cast_approx(self) -> T
fn cast_approx(self) -> T
Source§impl<S, T> CastFloat<T> for Swhere
T: ConvFloat<S>,
impl<S, T> CastFloat<T> for Swhere
T: ConvFloat<S>,
Source§fn cast_trunc(self) -> T
fn cast_trunc(self) -> T
Cast to integer, truncating Read more
Source§fn cast_nearest(self) -> T
fn cast_nearest(self) -> T
Cast to the nearest integer Read more
Source§fn cast_floor(self) -> T
fn cast_floor(self) -> T
Cast the floor to an integer Read more
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.