#[non_exhaustive]pub enum InputSource {
Inline {
value: Value,
},
Reference {
data_ref: DataRef,
},
}Expand description
How input data is provided to a worker.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Inline
Data embedded directly in the message (small payloads).
Fields
value: ValueThe value itself, carried in the message.
Reference
Data referenced in a remote store (large payloads).
Fields
data_ref: DataRefWhere to fetch the value from; see InputSource::resolve.
Implementations§
Source§impl InputSource
impl InputSource
Sourcepub fn resolve(
&self,
data_store: Option<&dyn DataStore>,
temp_store: &LocalDataStore,
) -> Result<Value>
pub fn resolve( &self, data_store: Option<&dyn DataStore>, temp_store: &LocalDataStore, ) -> Result<Value>
Resolve the input to a concrete Value.
Tries the persistent DataStore first, then the temp store that
HTTP uploads land in.
A reference that resolves nowhere is an error, and it did not
used to be: this logged a warning and returned [Value::Empty].
That value went on to the filter, so the failure surfaced as a
TypeError inside somebody’s own fit — hundreds of thousands of
rows after the actual problem, and pointing at their code. The
usual cause is the asymmetry this error names: the client uploaded
to a store the worker was never given.
Trait Implementations§
Source§impl Clone for InputSource
impl Clone for InputSource
Source§fn clone(&self) -> InputSource
fn clone(&self) -> InputSource
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for InputSource
impl Debug for InputSource
Source§impl<'de> Deserialize<'de> for InputSource
impl<'de> Deserialize<'de> for InputSource
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for InputSource
impl RefUnwindSafe for InputSource
impl Send for InputSource
impl Sync for InputSource
impl Unpin for InputSource
impl UnsafeUnpin for InputSource
impl UnwindSafe for InputSource
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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