Struct mz_storage::source::DelimitedValueSource
source · [−]pub struct DelimitedValueSource<S>(_);
Expand description
A wrapper that converts a delimited source reader that only provides values into a key/value reader whose key is always None
Trait Implementations
sourceimpl<S, D: Data> SourceReader for DelimitedValueSource<S>where
S: SourceReader<Key = (), Value = Option<Vec<u8>>, Diff = D>,
impl<S, D: Data> SourceReader for DelimitedValueSource<S>where
S: SourceReader<Key = (), Value = Option<Vec<u8>>, Diff = D>,
type Key = Option<Vec<u8, Global>>
type Value = Option<Vec<u8, Global>>
type Diff = D
type OffsetCommitter = <S as SourceReader>::OffsetCommitter
type Connection = <S as SourceReader>::Connection
sourcefn new(
source_name: String,
source_id: GlobalId,
worker_id: usize,
worker_count: usize,
consumer_activator: SyncActivator,
connection: Self::Connection,
restored_offsets: Vec<(PartitionId, Option<MzOffset>)>,
encoding: SourceDataEncoding,
metrics: SourceBaseMetrics,
connection_context: ConnectionContext
) -> Result<(Self, Self::OffsetCommitter), Error>
fn new(
source_name: String,
source_id: GlobalId,
worker_id: usize,
worker_count: usize,
consumer_activator: SyncActivator,
connection: Self::Connection,
restored_offsets: Vec<(PartitionId, Option<MzOffset>)>,
encoding: SourceDataEncoding,
metrics: SourceBaseMetrics,
connection_context: ConnectionContext
) -> Result<(Self, Self::OffsetCommitter), Error>
Create a new source reader. Read more
sourcefn get_next_message(
&mut self
) -> Result<NextMessage<Self::Key, Self::Value, Self::Diff>, SourceReaderError>
fn get_next_message(
&mut self
) -> Result<NextMessage<Self::Key, Self::Value, Self::Diff>, SourceReaderError>
Returns the next message available from the source. Read more
sourcefn next<'life0, 'async_trait>(
&'life0 mut self,
timestamp_granularity: Duration
) -> Pin<Box<dyn Future<Output = Option<Result<SourceMessageType<Self::Key, Self::Value, Self::Diff>, SourceReaderError>>> + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn next<'life0, 'async_trait>(
&'life0 mut self,
timestamp_granularity: Duration
) -> Pin<Box<dyn Future<Output = Option<Result<SourceMessageType<Self::Key, Self::Value, Self::Diff>, SourceReaderError>>> + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Returns the next message available from the source. Read more
sourcefn into_stream<'a>(
self,
timestamp_granularity: Duration
) -> LocalBoxStream<'a, Result<SourceMessageType<Self::Key, Self::Value, Self::Diff>, SourceReaderError>>where
Self: Sized + 'a,
fn into_stream<'a>(
self,
timestamp_granularity: Duration
) -> LocalBoxStream<'a, Result<SourceMessageType<Self::Key, Self::Value, Self::Diff>, SourceReaderError>>where
Self: Sized + 'a,
Returns an adapter that treats the source as a stream. Read more
Auto Trait Implementations
impl<S> RefUnwindSafe for DelimitedValueSource<S>where
S: RefUnwindSafe,
impl<S> Send for DelimitedValueSource<S>where
S: Send,
impl<S> Sync for DelimitedValueSource<S>where
S: Sync,
impl<S> Unpin for DelimitedValueSource<S>where
S: Unpin,
impl<S> UnwindSafe for DelimitedValueSource<S>where
S: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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> FutureExt for T
impl<T> FutureExt for T
sourcefn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
sourcefn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
sourcefn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request
sourceimpl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<P, R> ProtoType<R> for Pwhere
R: RustType<P>,
impl<P, R> ProtoType<R> for Pwhere
R: RustType<P>,
sourcefn into_rust(self) -> Result<R, TryFromProtoError>
fn into_rust(self) -> Result<R, TryFromProtoError>
See
RustType::from_proto
.sourcefn from_rust(rust: &R) -> P
fn from_rust(rust: &R) -> P
See
RustType::into_proto
.