pub struct SurfaceMetadata {
pub labels: BTreeMap<String, String>,
pub app_context: Option<Value>,
}Expand description
Opaque caller-owned metadata shared across public surfaces.
Fields§
§labels: BTreeMap<String, String>Caller-owned labels for filtering and projection.
app_context: Option<Value>Caller-owned opaque application context.
Implementations§
Source§impl SurfaceMetadata
impl SurfaceMetadata
Sourcepub fn from_optional_parts(
labels: Option<BTreeMap<String, String>>,
app_context: Option<Value>,
) -> Self
pub fn from_optional_parts( labels: Option<BTreeMap<String, String>>, app_context: Option<Value>, ) -> Self
Build metadata from the existing optional create-surface fields.
Sourcepub fn validate_public(&self) -> Result<(), SurfaceMetadataError>
pub fn validate_public(&self) -> Result<(), SurfaceMetadataError>
Validate caller-supplied metadata against Meerkat-owned keys.
Trait Implementations§
Source§impl Clone for SurfaceMetadata
impl Clone for SurfaceMetadata
Source§fn clone(&self) -> SurfaceMetadata
fn clone(&self) -> SurfaceMetadata
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 SurfaceMetadata
impl Debug for SurfaceMetadata
Source§impl Default for SurfaceMetadata
impl Default for SurfaceMetadata
Source§fn default() -> SurfaceMetadata
fn default() -> SurfaceMetadata
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SurfaceMetadata
impl<'de> Deserialize<'de> for SurfaceMetadata
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<SurfaceMetadata> for RuntimeMetadata
impl From<SurfaceMetadata> for RuntimeMetadata
Source§fn from(surface: SurfaceMetadata) -> Self
fn from(surface: SurfaceMetadata) -> Self
Converts to this type from the input type.
Source§impl JsonSchema for SurfaceMetadata
impl JsonSchema for SurfaceMetadata
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 SurfaceMetadata
impl PartialEq for SurfaceMetadata
Source§fn eq(&self, other: &SurfaceMetadata) -> bool
fn eq(&self, other: &SurfaceMetadata) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for SurfaceMetadata
impl Serialize for SurfaceMetadata
impl Eq for SurfaceMetadata
impl StructuralPartialEq for SurfaceMetadata
Auto Trait Implementations§
impl Freeze for SurfaceMetadata
impl RefUnwindSafe for SurfaceMetadata
impl Send for SurfaceMetadata
impl Sync for SurfaceMetadata
impl Unpin for SurfaceMetadata
impl UnsafeUnpin for SurfaceMetadata
impl UnwindSafe for SurfaceMetadata
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§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.