pub enum FieldSource {
Column(Column),
Group(Vec<Field>),
Geo(Geo),
Relation(Relation),
Constant(GenericValue),
}Expand description
Where a field’s value comes from. The shapes are mutually exclusive — a field
is exactly one of them — which is why this is an enum rather than a bag of
optional column / relation / fields that can contradict each other.
Variants§
Column(Column)
A column of the current row, optionally transformed, with an optional fallback when the column is null.
Group(Vec<Field>)
A sub-object assembled from sibling fields of the same row (it adds a nesting level in the document without reading a related table).
Geo(Geo)
Relation(Relation)
Data drawn from a related table — folded in as nested documents
(Join) or reduced to a single value
(Aggregate).
Constant(GenericValue)
A constant value with no database source — None renders as null.
Trait Implementations§
Source§impl Clone for FieldSource
impl Clone for FieldSource
Source§fn clone(&self) -> FieldSource
fn clone(&self) -> FieldSource
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 moreSource§impl Debug for FieldSource
impl Debug for FieldSource
Source§impl<'de> Deserialize<'de> for FieldSource
impl<'de> Deserialize<'de> for FieldSource
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<FieldSource, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<FieldSource, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for FieldSource
impl Hash for FieldSource
Source§impl Serialize for FieldSource
impl Serialize for FieldSource
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for FieldSource
impl RefUnwindSafe for FieldSource
impl Send for FieldSource
impl Sync for FieldSource
impl Unpin for FieldSource
impl UnsafeUnpin for FieldSource
impl UnwindSafe for FieldSource
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