pub struct RuntimeMetadataTable { /* private fields */ }Expand description
In-memory label table keyed by MetadataScope.
Operations replace label sets wholesale (no merge). Callers wanting merge semantics should read first, mutate the map, then write it back.
Implementations§
Source§impl RuntimeMetadataTable
impl RuntimeMetadataTable
Sourcepub async fn set_labels(
&self,
scope: MetadataScope,
labels: BTreeMap<String, String>,
)
pub async fn set_labels( &self, scope: MetadataScope, labels: BTreeMap<String, String>, )
Replace the label set for scope. An empty labels map clears
the entry.
Sourcepub async fn get_labels(
&self,
scope: &MetadataScope,
) -> BTreeMap<String, String>
pub async fn get_labels( &self, scope: &MetadataScope, ) -> BTreeMap<String, String>
Return the label set for scope, or an empty map if none is set.
Sourcepub async fn delete_labels(
&self,
scope: &MetadataScope,
) -> Option<BTreeMap<String, String>>
pub async fn delete_labels( &self, scope: &MetadataScope, ) -> Option<BTreeMap<String, String>>
Remove the label set for scope. Returns the previous value if any.
Sourcepub async fn list_labels_for_mob(
&self,
mob_id: &str,
) -> Vec<(MetadataScope, BTreeMap<String, String>)>
pub async fn list_labels_for_mob( &self, mob_id: &str, ) -> Vec<(MetadataScope, BTreeMap<String, String>)>
Return all label sets associated with a mob — both the mob-scoped entry (if any) and every run-scoped entry whose mob id matches.
Trait Implementations§
Source§impl Clone for RuntimeMetadataTable
impl Clone for RuntimeMetadataTable
Source§fn clone(&self) -> RuntimeMetadataTable
fn clone(&self) -> RuntimeMetadataTable
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 RuntimeMetadataTable
impl Debug for RuntimeMetadataTable
Source§impl Default for RuntimeMetadataTable
impl Default for RuntimeMetadataTable
Source§fn default() -> RuntimeMetadataTable
fn default() -> RuntimeMetadataTable
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RuntimeMetadataTable
impl !RefUnwindSafe for RuntimeMetadataTable
impl Send for RuntimeMetadataTable
impl Sync for RuntimeMetadataTable
impl Unpin for RuntimeMetadataTable
impl UnsafeUnpin for RuntimeMetadataTable
impl !UnwindSafe for RuntimeMetadataTable
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<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 more