pub struct FieldSchema<DataType = ValueType> {
pub name: FieldName,
pub value_type: EnrichedValueType<DataType>,
pub description: Option<Arc<str>>,
}Fields§
§name: FieldNameID is used to identify the field in the schema.
value_type: EnrichedValueType<DataType>§description: Option<Arc<str>>Optional description for the field.
Implementations§
Source§impl FieldSchema
impl FieldSchema
pub fn new(name: impl ToString, value_type: EnrichedValueType) -> Self
pub fn new_with_description( name: impl ToString, value_type: EnrichedValueType, description: Option<impl ToString>, ) -> Self
pub fn without_attrs(&self) -> Self
Source§impl<DataType> FieldSchema<DataType>
impl<DataType> FieldSchema<DataType>
pub fn from_alternative<AltDataType>( field: &FieldSchema<AltDataType>, ) -> Result<Self>
Trait Implementations§
Source§impl<DataType: Clone> Clone for FieldSchema<DataType>
impl<DataType: Clone> Clone for FieldSchema<DataType>
Source§fn clone(&self) -> FieldSchema<DataType>
fn clone(&self) -> FieldSchema<DataType>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<DataType: Debug> Debug for FieldSchema<DataType>
impl<DataType: Debug> Debug for FieldSchema<DataType>
Source§impl<'de, DataType> Deserialize<'de> for FieldSchema<DataType>where
DataType: Deserialize<'de>,
impl<'de, DataType> Deserialize<'de> for FieldSchema<DataType>where
DataType: Deserialize<'de>,
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for FieldSchema
impl Display for FieldSchema
Source§impl<DataType: PartialEq> PartialEq for FieldSchema<DataType>
impl<DataType: PartialEq> PartialEq for FieldSchema<DataType>
Source§impl<DataType> Serialize for FieldSchema<DataType>where
DataType: Serialize,
impl<DataType> Serialize for FieldSchema<DataType>where
DataType: Serialize,
impl<DataType: Eq> Eq for FieldSchema<DataType>
impl<DataType> StructuralPartialEq for FieldSchema<DataType>
Auto Trait Implementations§
impl<DataType> Freeze for FieldSchema<DataType>where
DataType: Freeze,
impl<DataType> RefUnwindSafe for FieldSchema<DataType>where
DataType: RefUnwindSafe,
impl<DataType> Send for FieldSchema<DataType>where
DataType: Send,
impl<DataType> Sync for FieldSchema<DataType>where
DataType: Sync,
impl<DataType> Unpin for FieldSchema<DataType>where
DataType: Unpin,
impl<DataType> UnwindSafe for FieldSchema<DataType>where
DataType: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.