pub struct GenericJoiner<G, M: JoinMode, const BODY_SIZE: usize = DEFAULT_BODY_SIZE>where
G: ChunkGet<BODY_SIZE>,{ /* private fields */ }Expand description
Generic async joiner parameterized by chunk mode.
Implementations§
Source§impl<G, M, const BODY_SIZE: usize> GenericJoiner<G, M, BODY_SIZE>
impl<G, M, const BODY_SIZE: usize> GenericJoiner<G, M, BODY_SIZE>
Sourcepub async fn new(getter: G, input: M::RootRef) -> Result<Self>
pub async fn new(getter: G, input: M::RootRef) -> Result<Self>
Create an async joiner from a root reference.
Sourcepub fn with_concurrency(self, concurrency: usize) -> Self
pub fn with_concurrency(self, concurrency: usize) -> Self
Set concurrency level for prefetching.
Sourcepub const fn root(&self) -> &ChunkAddress
pub const fn root(&self) -> &ChunkAddress
Root address.
Sourcepub async fn read_range(&self, offset: u64, len: usize) -> Result<Vec<u8>>
pub async fn read_range(&self, offset: u64, len: usize) -> Result<Vec<u8>>
Read a range of bytes with concurrent fetching using the cached frontier.
Sourcepub fn seek(&mut self, pos: SeekFrom) -> Result<u64>
pub fn seek(&mut self, pos: SeekFrom) -> Result<u64>
Update read position (synchronous — just updates internal state).
Sourcepub fn into_stream(self) -> impl Stream<Item = Result<Bytes>>
pub fn into_stream(self) -> impl Stream<Item = Result<Bytes>>
Convert into a stream of leaf chunk bodies.
Sourcepub fn into_reader(self) -> JoinerReader<G, M, BODY_SIZE>
pub fn into_reader(self) -> JoinerReader<G, M, BODY_SIZE>
Convert into an AsyncRead reader.
Trait Implementations§
Auto Trait Implementations§
impl<G, M, const BODY_SIZE: usize> Freeze for GenericJoiner<G, M, BODY_SIZE>
impl<G, M, const BODY_SIZE: usize> RefUnwindSafe for GenericJoiner<G, M, BODY_SIZE>
impl<G, M, const BODY_SIZE: usize> Send for GenericJoiner<G, M, BODY_SIZE>where
M: Send,
impl<G, M, const BODY_SIZE: usize> Sync for GenericJoiner<G, M, BODY_SIZE>where
M: Sync,
impl<G, M, const BODY_SIZE: usize> Unpin for GenericJoiner<G, M, BODY_SIZE>
impl<G, M, const BODY_SIZE: usize> UnsafeUnpin for GenericJoiner<G, M, BODY_SIZE>
impl<G, M, const BODY_SIZE: usize> UnwindSafe for GenericJoiner<G, M, BODY_SIZE>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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