#[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§
source§impl<T: Clone + Default> Clone for MetadataView<T>
impl<T: Clone + Default> Clone for MetadataView<T>
source§fn clone(&self) -> MetadataView<T>
fn clone(&self) -> MetadataView<T>
Returns a copy 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<T: Default + Default> Default for MetadataView<T>
impl<T: Default + Default> Default for MetadataView<T>
source§fn default() -> MetadataView<T>
fn default() -> MetadataView<T>
Returns the “default value” for a type. Read more
source§impl<'de, T> Deserialize<'de> for MetadataView<T>
impl<'de, T> Deserialize<'de> for MetadataView<T>
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<T: Into<Struct> + Default + Clone> From<&MetadataView<T>> for Struct
impl<T: Into<Struct> + Default + Clone> From<&MetadataView<T>> for Struct
source§fn from(metadata: &MetadataView<T>) -> Self
fn from(metadata: &MetadataView<T>) -> Self
Converts to this type from the input type.
source§impl<T: Into<Struct> + Default> From<MetadataView<T>> for Struct
impl<T: Into<Struct> + Default> From<MetadataView<T>> for Struct
source§fn from(metadata: MetadataView<T>) -> Self
fn from(metadata: MetadataView<T>) -> Self
Converts to this type from the input type.
source§impl<T: Default + JsonSchema> JsonSchema for MetadataView<T>
impl<T: Default + JsonSchema> JsonSchema for MetadataView<T>
source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
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(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 moresource§impl<T: PartialEq + Default> PartialEq for MetadataView<T>
impl<T: PartialEq + Default> PartialEq for MetadataView<T>
source§fn eq(&self, other: &MetadataView<T>) -> bool
fn eq(&self, other: &MetadataView<T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<T> Serialize for MetadataView<T>
impl<T> Serialize for MetadataView<T>
source§impl<T, E> TryFrom<Struct> for MetadataView<T>
impl<T, E> TryFrom<Struct> for MetadataView<T>
impl<T: Eq + Default> Eq 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§
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§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> 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> 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