pub struct ExtendingRangeSourceFactory { /* private fields */ }Expand description
Factory for ExtendingRangeSource. Differs from
RangeSourceFactory in that end is an atomic that the
extension policy may grow over the lifetime of the phase.
global_extent() returns the CURRENT end so phase-status
displays reflect any growth honestly.
Implementations§
Source§impl ExtendingRangeSourceFactory
impl ExtendingRangeSourceFactory
Sourcepub fn new(
name: &str,
start: u64,
initial_extent: u64,
policy: Arc<dyn ExtensionPolicy>,
) -> Self
pub fn new( name: &str, start: u64, initial_extent: u64, policy: Arc<dyn ExtensionPolicy>, ) -> Self
Build with an initial extent [start, start + initial_extent).
The extension policy is consulted only when the cursor
reaches the end — the first stride consumed produces
indices in the initial range.
Trait Implementations§
Source§impl DataSourceFactory for ExtendingRangeSourceFactory
impl DataSourceFactory for ExtendingRangeSourceFactory
Source§fn create_reader(&self) -> Box<dyn DataSource>
fn create_reader(&self) -> Box<dyn DataSource>
Create a new reader for a fiber.
Source§fn schema(&self) -> &SourceSchema
fn schema(&self) -> &SourceSchema
Schema for all readers from this factory.
Source§fn global_consumed(&self) -> u64
fn global_consumed(&self) -> u64
Global items consumed across all readers (for progress reporting).
Source§fn global_extent(&self) -> Option<u64>
fn global_extent(&self) -> Option<u64>
Known extent, if finite. Same as schema().extent but avoids clone.
Source§fn replay_contract(&self) -> SourceReplayContract
fn replay_contract(&self) -> SourceReplayContract
Replay/addressability capability shared by readers from this factory.
Source§fn rewind_for_poll(&self) -> bool
fn rewind_for_poll(&self) -> bool
Rewind the factory’s shared cursor to the start so a
subsequent
create_reader() produces a fresh stream
covering the same ordinal range: what a host that re-runs a
source between poll rounds calls after each round exhausts it. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for ExtendingRangeSourceFactory
impl !UnwindSafe for ExtendingRangeSourceFactory
impl Freeze for ExtendingRangeSourceFactory
impl Send for ExtendingRangeSourceFactory
impl Sync for ExtendingRangeSourceFactory
impl Unpin for ExtendingRangeSourceFactory
impl UnsafeUnpin for ExtendingRangeSourceFactory
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