Struct ContainerValues
pub struct ContainerValues { /* private fields */ }Implementations§
§impl ContainerValues
impl ContainerValues
pub fn new() -> ContainerValues
pub fn for_each<C>(&self, f: impl FnMut(&C, Value))where
C: ContainerValue,
pub fn for_each<C>(&self, f: impl FnMut(&C, Value))where
C: ContainerValue,
Iterate over the containers of the given type.
pub fn get_val<C>(&self, val: Value) -> Option<impl Deref<Target = C>>where
C: ContainerValue,
pub fn get_val<C>(&self, val: Value) -> Option<impl Deref<Target = C>>where
C: ContainerValue,
Get the container associated with the value val in the database. The caller must know the
type of the container.
The return type of this function may contain lock guards. Attempts to modify the contents of the containers database may deadlock if the given guard has not been dropped.
pub fn register_val<C>(
&self,
container: C,
exec_state: &mut ExecutionState<'_>,
) -> Valuewhere
C: ContainerValue,
pub fn rebuild_all(
&mut self,
table_id: TableId,
table: &WrappedTable,
exec_state: &mut ExecutionState<'_>,
) -> bool
pub fn rebuild_all( &mut self, table_id: TableId, table: &WrappedTable, exec_state: &mut ExecutionState<'_>, ) -> bool
Apply the given rebuild to the contents of each container.
pub fn register_type<C>(
&mut self,
id_counter: CounterId,
merge_fn: impl MergeFn + 'static,
) -> ContainerValueIdwhere
C: ContainerValue,
pub fn register_type<C>(
&mut self,
id_counter: CounterId,
merge_fn: impl MergeFn + 'static,
) -> ContainerValueIdwhere
C: ContainerValue,
Add a new container type to the given ContainerValue instance.
Container types need a meaans of generating fresh ids (id_counter) along with a means of
merging conflicting ids (merge_fn).
Trait Implementations§
§impl Clone for ContainerValues
impl Clone for ContainerValues
§fn clone(&self) -> ContainerValues
fn clone(&self) -> ContainerValues
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Default for ContainerValues
impl Default for ContainerValues
§fn default() -> ContainerValues
fn default() -> ContainerValues
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ContainerValues
impl !RefUnwindSafe for ContainerValues
impl Send for ContainerValues
impl Sync for ContainerValues
impl Unpin for ContainerValues
impl !UnwindSafe for ContainerValues
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more