Struct quilkin::metadata::MetadataView
source · [−]#[non_exhaustive]pub struct MetadataView<T: Default> {
pub known: T,
pub unknown: Map<String, Value>,
}
Expand description
Represents a view into the metadata object attached to another object. T
represents metadata known to Quilkin under quilkin.dev
(available under
the KEY
constant.)
Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.known: T
Known Quilkin metadata.
unknown: Map<String, Value>
User created metadata.
Implementations
Trait Implementations
sourceimpl<T: Clone + Default> Clone for MetadataView<T>
impl<T: Clone + Default> Clone for MetadataView<T>
sourcefn clone(&self) -> MetadataView<T>
fn clone(&self) -> MetadataView<T>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<T: Debug + Default> Debug for MetadataView<T>
impl<T: Debug + Default> Debug for MetadataView<T>
sourceimpl<T: Default + Default> Default for MetadataView<T>
impl<T: Default + Default> Default for MetadataView<T>
sourcefn default() -> MetadataView<T>
fn default() -> MetadataView<T>
Returns the “default value” for a type. Read more
sourceimpl<'de, T: Default> Deserialize<'de> for MetadataView<T>where
T: Deserialize<'de>,
T: Default,
impl<'de, T: Default> Deserialize<'de> for MetadataView<T>where
T: Deserialize<'de>,
T: Default,
sourcefn 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
sourceimpl<T: Into<Struct> + Default> From<MetadataView<T>> for ProtoMetadata
impl<T: Into<Struct> + Default> From<MetadataView<T>> for ProtoMetadata
sourcefn from(metadata: MetadataView<T>) -> Self
fn from(metadata: MetadataView<T>) -> Self
Converts to this type from the input type.
sourceimpl<T: Default + JsonSchema> JsonSchema for MetadataView<T>
impl<T: Default + JsonSchema> JsonSchema for MetadataView<T>
sourcefn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
sourcefn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moresourceimpl<T: PartialEq + Default> PartialEq<MetadataView<T>> for MetadataView<T>
impl<T: PartialEq + Default> PartialEq<MetadataView<T>> for MetadataView<T>
sourcefn eq(&self, other: &MetadataView<T>) -> bool
fn eq(&self, other: &MetadataView<T>) -> bool
sourceimpl<T: Default> Serialize for MetadataView<T>where
T: Serialize,
impl<T: Default> Serialize for MetadataView<T>where
T: Serialize,
sourceimpl<T, E> TryFrom<Metadata> for MetadataView<T>where
T: TryFrom<Struct, Error = E> + Default,
impl<T, E> TryFrom<Metadata> for MetadataView<T>where
T: TryFrom<Struct, Error = E> + Default,
impl<T: Eq + Default> Eq for MetadataView<T>
impl<T: Default> StructuralEq for MetadataView<T>
impl<T: Default> StructuralPartialEq for MetadataView<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for MetadataView<T>where
T: RefUnwindSafe,
impl<T> Send for MetadataView<T>where
T: Send,
impl<T> Sync for MetadataView<T>where
T: Sync,
impl<T> Unpin for MetadataView<T>where
T: Unpin,
impl<T> UnwindSafe for MetadataView<T>where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
sourcefn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request