pub struct IngestContext { /* private fields */ }Expand description
Where a run of ingestion is reading from, and what that makes its output.
Carried as one value rather than three parameters because every write the run performs — episodes and confidence updates alike — must agree on it.
Implementations§
Source§impl IngestContext
impl IngestContext
Sourcepub fn new(session_id: impl Into<String>, log_number: Option<u32>) -> Self
pub fn new(session_id: impl Into<String>, log_number: Option<u32>) -> Self
Context for a conversation archive: provenance is read off turn roles.
Sourcepub fn with_provenance(self, provenance: ProvenancePolicy) -> Self
pub fn with_provenance(self, provenance: ProvenancePolicy) -> Self
Override the class assignment for the whole run.
Sourcepub fn with_override(self, provenance: Option<Provenance>) -> Self
pub fn with_override(self, provenance: Option<Provenance>) -> Self
Force every episode in the run to one class, or infer per chunk when
provenance is None. The shape a CLI --external flag arrives in.
Sourcepub fn session_id(&self) -> &str
pub fn session_id(&self) -> &str
Session this text belongs to.
Sourcepub fn log_number(&self) -> Option<u32>
pub fn log_number(&self) -> Option<u32>
Archive log number, when the text came from a numbered archive.
Trait Implementations§
Source§impl Clone for IngestContext
impl Clone for IngestContext
Source§fn clone(&self) -> IngestContext
fn clone(&self) -> IngestContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for IngestContext
impl RefUnwindSafe for IngestContext
impl Send for IngestContext
impl Sync for IngestContext
impl Unpin for IngestContext
impl UnsafeUnpin for IngestContext
impl UnwindSafe for IngestContext
Blanket Implementations§
impl<T> AsyncFriendly for T
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request