pub struct ShardedLookup<'needle> { /* private fields */ }
Expand description
ShardedLookup
can walk over multiple HAMT sharded directory nodes which allows multiple block
spanning directories.
Implementations§
Source§impl<'needle> ShardedLookup<'needle>
impl<'needle> ShardedLookup<'needle>
Sourcepub fn pending_links(&self) -> (&Cid, impl Iterator<Item = &Cid>)
pub fn pending_links(&self) -> (&Cid, impl Iterator<Item = &Cid>)
Returns the next pending link and an iterator over the rest.
Sourcepub fn continue_walk(
self,
next: &[u8],
cache: &mut Option<Cache>,
) -> Result<MaybeResolved<'needle>, LookupError>
pub fn continue_walk( self, next: &[u8], cache: &mut Option<Cache>, ) -> Result<MaybeResolved<'needle>, LookupError>
Continues the walk in the DAG of HAMT buckets searching for the original needle
.
Sourcepub fn with_owned_needle(self) -> ShardedLookup<'static>
pub fn with_owned_needle(self) -> ShardedLookup<'static>
Transforms this ShardedLookup
into a ShardedLookup<'static>
by taking ownership of the
needle we are trying to find.
Trait Implementations§
Auto Trait Implementations§
impl<'needle> Freeze for ShardedLookup<'needle>
impl<'needle> RefUnwindSafe for ShardedLookup<'needle>
impl<'needle> Send for ShardedLookup<'needle>
impl<'needle> Sync for ShardedLookup<'needle>
impl<'needle> Unpin for ShardedLookup<'needle>
impl<'needle> UnwindSafe for ShardedLookup<'needle>
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> 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