pub enum MetadataValue {
String(String),
Bool(bool),
Number(Number),
List(Vec<MetadataValue>),
Map(MetadataMap),
}Expand description
A generic metadata value.
Supported variants:
- String
- Bool
- Number (serde_json::Number – can represent integer & floating point)
- List (Vec
) - Map (nested MetadataMap)
Variants§
Implementations§
Trait Implementations§
Source§impl Clone for MetadataValue
impl Clone for MetadataValue
Source§fn clone(&self) -> MetadataValue
fn clone(&self) -> MetadataValue
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 MetadataValue
impl Debug for MetadataValue
Source§impl<'de> Deserialize<'de> for MetadataValue
impl<'de> Deserialize<'de> for MetadataValue
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 From<&MetadataValue> for Value
Conversion from MetadataValue to prost_types::Value for protobuf serialization
impl From<&MetadataValue> for Value
Conversion from MetadataValue to prost_types::Value for protobuf serialization
Source§fn from(value: &MetadataValue) -> Self
fn from(value: &MetadataValue) -> Self
Converts to this type from the input type.
Source§impl From<&str> for MetadataValue
impl From<&str> for MetadataValue
Source§impl From<MetadataMap> for MetadataValue
impl From<MetadataMap> for MetadataValue
Source§fn from(m: MetadataMap) -> Self
fn from(m: MetadataMap) -> Self
Converts to this type from the input type.
Source§impl From<String> for MetadataValue
impl From<String> for MetadataValue
Source§impl<T: Into<MetadataValue>> From<Vec<T>> for MetadataValue
impl<T: Into<MetadataValue>> From<Vec<T>> for MetadataValue
Source§impl From<bool> for MetadataValue
impl From<bool> for MetadataValue
Source§impl From<f64> for MetadataValue
impl From<f64> for MetadataValue
Source§impl From<i64> for MetadataValue
impl From<i64> for MetadataValue
Source§impl From<u64> for MetadataValue
impl From<u64> for MetadataValue
Source§impl JsonSchema for MetadataValue
impl JsonSchema for MetadataValue
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for MetadataValue
impl PartialEq for MetadataValue
Source§fn eq(&self, other: &MetadataValue) -> bool
fn eq(&self, other: &MetadataValue) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for MetadataValue
impl Serialize for MetadataValue
impl StructuralPartialEq for MetadataValue
Source§impl<'a> TryFrom<&'a MetadataValue> for &'a str
impl<'a> TryFrom<&'a MetadataValue> for &'a str
Source§type Error = MetadataConversionError
type Error = MetadataConversionError
The type returned in the event of a conversion error.
Source§impl TryFrom<&MetadataValue> for String
impl TryFrom<&MetadataValue> for String
Source§type Error = MetadataConversionError
type Error = MetadataConversionError
The type returned in the event of a conversion error.
Source§impl TryFrom<&MetadataValue> for bool
impl TryFrom<&MetadataValue> for bool
Source§type Error = MetadataConversionError
type Error = MetadataConversionError
The type returned in the event of a conversion error.
Source§impl TryFrom<&MetadataValue> for Number
impl TryFrom<&MetadataValue> for Number
Source§type Error = MetadataConversionError
type Error = MetadataConversionError
The type returned in the event of a conversion error.
Source§impl TryFrom<&MetadataValue> for i64
impl TryFrom<&MetadataValue> for i64
Source§type Error = MetadataConversionError
type Error = MetadataConversionError
The type returned in the event of a conversion error.
Source§impl TryFrom<&MetadataValue> for u64
impl TryFrom<&MetadataValue> for u64
Source§type Error = MetadataConversionError
type Error = MetadataConversionError
The type returned in the event of a conversion error.
Source§impl TryFrom<&MetadataValue> for f64
impl TryFrom<&MetadataValue> for f64
Source§type Error = MetadataConversionError
type Error = MetadataConversionError
The type returned in the event of a conversion error.
Source§impl TryFrom<&MetadataValue> for Vec<MetadataValue>
impl TryFrom<&MetadataValue> for Vec<MetadataValue>
Source§type Error = MetadataConversionError
type Error = MetadataConversionError
The type returned in the event of a conversion error.
Source§impl TryFrom<&MetadataValue> for MetadataMap
impl TryFrom<&MetadataValue> for MetadataMap
Source§type Error = MetadataConversionError
type Error = MetadataConversionError
The type returned in the event of a conversion error.
Source§impl TryFrom<MetadataValue> for String
impl TryFrom<MetadataValue> for String
Source§type Error = MetadataConversionError
type Error = MetadataConversionError
The type returned in the event of a conversion error.
Source§impl TryFrom<MetadataValue> for bool
impl TryFrom<MetadataValue> for bool
Source§type Error = MetadataConversionError
type Error = MetadataConversionError
The type returned in the event of a conversion error.
Source§impl TryFrom<MetadataValue> for Number
impl TryFrom<MetadataValue> for Number
Source§type Error = MetadataConversionError
type Error = MetadataConversionError
The type returned in the event of a conversion error.
Source§impl TryFrom<MetadataValue> for i64
impl TryFrom<MetadataValue> for i64
Source§type Error = MetadataConversionError
type Error = MetadataConversionError
The type returned in the event of a conversion error.
Source§impl TryFrom<MetadataValue> for u64
impl TryFrom<MetadataValue> for u64
Source§type Error = MetadataConversionError
type Error = MetadataConversionError
The type returned in the event of a conversion error.
Source§impl TryFrom<MetadataValue> for f64
impl TryFrom<MetadataValue> for f64
Source§type Error = MetadataConversionError
type Error = MetadataConversionError
The type returned in the event of a conversion error.
Source§impl TryFrom<MetadataValue> for Vec<MetadataValue>
impl TryFrom<MetadataValue> for Vec<MetadataValue>
Source§type Error = MetadataConversionError
type Error = MetadataConversionError
The type returned in the event of a conversion error.
Source§impl TryFrom<MetadataValue> for MetadataMap
impl TryFrom<MetadataValue> for MetadataMap
Source§type Error = MetadataConversionError
type Error = MetadataConversionError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Freeze for MetadataValue
impl RefUnwindSafe for MetadataValue
impl Send for MetadataValue
impl Sync for MetadataValue
impl Unpin for MetadataValue
impl UnsafeUnpin for MetadataValue
impl UnwindSafe for MetadataValue
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> 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