pub struct Objects { /* private fields */ }
Implementations
sourceimpl Objects
impl Objects
pub fn new() -> Self
pub fn contains(&self, id: &ObjectId) -> bool
pub fn get(&self, id: &ObjectId) -> Option<&Object>
pub fn get_mut(&mut self, id: &ObjectId) -> Option<&mut Object>
pub unsafe fn get_unchecked(&self, id: &ObjectId) -> &Object
pub unsafe fn get_mut_unchecked(&mut self, id: &ObjectId) -> &mut Object
pub fn get_multiple<'a>(
&self,
ids: impl IntoIterator<Item = &'a ObjectId>
) -> impl Iterator<Item = (&'a ObjectId, &Object)>
pub fn remove_objects<'a>(
&'a mut self,
ids: impl IntoIterator<Item = &'a ObjectId> + 'a
) -> impl Iterator<Item = Option<(ObjectId, Object)>> + 'a
pub unsafe fn remove_objects_unchecked<'a>(
&'a mut self,
ids: impl IntoIterator<Item = &'a ObjectId> + 'a
) -> impl Iterator<Item = (ObjectId, Object)> + 'a
pub fn read_objects<'a, P, R>(
&'a self,
ids: impl IntoIterator<Item = &'a ObjectId> + 'a,
predicate: P
) -> impl Iterator<Item = R> + 'a where
P: FnMut(&ObjectId, &Object) -> R + 'a,
pub fn read_objects_mut<'a, P, R>(
&'a mut self,
ids: impl IntoIterator<Item = &'a ObjectId> + 'a,
predicate: P
) -> impl Iterator<Item = R> + 'a where
P: FnMut(&ObjectId, &mut Object) -> R + 'a,
pub fn insert(&mut self, object_id: ObjectId, object: Object) -> Option<Object>
pub fn get_blobs<'a>(
&'a self,
ids: impl IntoIterator<Item = &'a ObjectId>
) -> impl Iterator<Item = &'a Blob>
pub fn get_blobs_cloned<'a>(
&'a self,
ids: impl IntoIterator<Item = &'a ObjectId> + 'a
) -> impl Iterator<Item = Blob> + 'a
pub fn get_trees_cloned<'a>(
&'a self,
ids: impl IntoIterator<Item = &'a ObjectId> + 'a
) -> impl Iterator<Item = Tree> + 'a
pub fn get_blobs_ids_cloned<'a>(
&'a self,
ids: impl IntoIterator<Item = &'a ObjectId> + 'a
) -> impl Iterator<Item = (Blob, ObjectId)> + 'a
pub fn get_trees_ids_cloned<'a>(
&'a self,
ids: impl IntoIterator<Item = &'a ObjectId> + 'a
) -> impl Iterator<Item = (Tree, ObjectId)> + 'a
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Objects
impl<'de> Deserialize<'de> for Objects
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Objects
impl Send for Objects
impl Sync for Objects
impl Unpin for Objects
impl UnwindSafe for Objects
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more