Struct grovedb_path::SubtreePath
source · pub struct SubtreePath<'b, B> { /* private fields */ }Expand description
Path to a GroveDB’s subtree with no owned data and cheap to clone.
Implementations§
source§impl SubtreePath<'static, [u8; 0]>
impl SubtreePath<'static, [u8; 0]>
source§impl<B> SubtreePath<'_, B>
impl<B> SubtreePath<'_, B>
source§impl<'b, B: AsRef<[u8]>> SubtreePath<'b, B>
impl<'b, B: AsRef<[u8]>> SubtreePath<'b, B>
sourcepub fn derive_owned(&self) -> SubtreePathBuilder<'b, B>
pub fn derive_owned(&self) -> SubtreePathBuilder<'b, B>
Get a derived path that will reuse this Self as it’s base path and capable of owning data.
sourcepub fn derive_owned_with_child<'s, S>(
&'b self,
segment: S,
) -> SubtreePathBuilder<'b, B>where
S: Into<CowLike<'s>>,
's: 'b,
pub fn derive_owned_with_child<'s, S>(
&'b self,
segment: S,
) -> SubtreePathBuilder<'b, B>where
S: Into<CowLike<'s>>,
's: 'b,
Get a derived path with a child path segment added.
sourcepub fn derive_parent(&self) -> Option<(SubtreePath<'b, B>, &'b [u8])>
pub fn derive_parent(&self) -> Option<(SubtreePath<'b, B>, &'b [u8])>
Get a derived subtree path for a parent with care for base path slice
case. The main difference from SubtreePath::derive_parent is that
lifetime of returned Self if not limited to the scope where this
function was called so it’s possible to follow to ancestor paths
without keeping previous result as it still will link to 'b
(latest SubtreePath or initial slice of data).
sourcepub fn into_reverse_iter(self) -> SubtreePathIter<'b, B> ⓘ
pub fn into_reverse_iter(self) -> SubtreePathIter<'b, B> ⓘ
Get a reverse path segments iterator.
Trait Implementations§
source§impl<B> Clone for SubtreePath<'_, B>
impl<B> Clone for SubtreePath<'_, B>
For the same reason as for Hash implementation, derived impl requires
generics to carry trait bounds that actually don’t needed.
source§impl<'b, B: Debug> Debug for SubtreePath<'b, B>
impl<'b, B: Debug> Debug for SubtreePath<'b, B>
source§impl<'b, B> From<&'b [B]> for SubtreePath<'b, B>
impl<'b, B> From<&'b [B]> for SubtreePath<'b, B>
source§impl<'s, 'b, B> From<&'s SubtreePath<'b, B>> for SubtreePathBuilder<'b, B>
impl<'s, 'b, B> From<&'s SubtreePath<'b, B>> for SubtreePathBuilder<'b, B>
source§fn from(value: &'s SubtreePath<'b, B>) -> Self
fn from(value: &'s SubtreePath<'b, B>) -> Self
source§impl<'s, 'b, B> From<&'s SubtreePathBuilder<'b, B>> for SubtreePath<'s, B>
impl<'s, 'b, B> From<&'s SubtreePathBuilder<'b, B>> for SubtreePath<'s, B>
Create a link to existing SubtreePath that cannot outlive it, because it possibly owns some of the path segments.
source§fn from(value: &'s SubtreePathBuilder<'b, B>) -> Self
fn from(value: &'s SubtreePathBuilder<'b, B>) -> Self
source§impl<'b, B: AsRef<[u8]>> Hash for SubtreePath<'b, B>
impl<'b, B: AsRef<[u8]>> Hash for SubtreePath<'b, B>
Hash order is the same as iteration order: from most deep path segment up to root.
source§impl<'bl, 'br, BL, BR> PartialEq<SubtreePath<'br, BR>> for SubtreePath<'bl, BL>
impl<'bl, 'br, BL, BR> PartialEq<SubtreePath<'br, BR>> for SubtreePath<'bl, BL>
source§fn eq(&self, other: &SubtreePath<'br, BR>) -> bool
fn eq(&self, other: &SubtreePath<'br, BR>) -> bool
self and other values to be equal, and is used
by ==.source§impl<'bl, 'br, BL, BR> PartialEq<SubtreePath<'br, BR>> for SubtreePathBuilder<'bl, BL>
impl<'bl, 'br, BL, BR> PartialEq<SubtreePath<'br, BR>> for SubtreePathBuilder<'bl, BL>
source§fn eq(&self, other: &SubtreePath<'br, BR>) -> bool
fn eq(&self, other: &SubtreePath<'br, BR>) -> bool
self and other values to be equal, and is used
by ==.source§impl<'bl, 'br, BL, BR> PartialEq<SubtreePathBuilder<'br, BR>> for SubtreePath<'bl, BL>
impl<'bl, 'br, BL, BR> PartialEq<SubtreePathBuilder<'br, BR>> for SubtreePath<'bl, BL>
source§fn eq(&self, other: &SubtreePathBuilder<'br, BR>) -> bool
fn eq(&self, other: &SubtreePathBuilder<'br, BR>) -> bool
self and other values to be equal, and is used
by ==.impl<'b, B: AsRef<[u8]>> Eq for SubtreePath<'b, B>
Auto Trait Implementations§
impl<'b, B> Freeze for SubtreePath<'b, B>
impl<'b, B> RefUnwindSafe for SubtreePath<'b, B>where
B: RefUnwindSafe,
impl<'b, B> Send for SubtreePath<'b, B>where
B: Sync,
impl<'b, B> Sync for SubtreePath<'b, B>where
B: Sync,
impl<'b, B> Unpin for SubtreePath<'b, B>
impl<'b, B> UnwindSafe for SubtreePath<'b, B>where
B: RefUnwindSafe,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)