pub struct ModelMetadataBuilder { /* private fields */ }
Expand description
Builder for ModelMetadata
.
Implementations§
Source§impl ModelMetadataBuilder
impl ModelMetadataBuilder
Sourcepub fn name<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn name<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
Name of the resource, needs to be unique across kinds
. When two resources share a name,
the one “closest” to the current working directory will take precedence.
Sourcepub fn description<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn description<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
Description of this resource, used when listing resources and helpful to inform users why the resource exists.
Sourcepub fn annotations<VALUE: Into<ModelMetadataAnnotations>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn annotations<VALUE: Into<ModelMetadataAnnotations>>( &mut self, value: VALUE, ) -> &mut Self
Annotations attach arbitrary non-identifying metadata to objects.
Sourcepub fn labels<VALUE: Into<BTreeMap<String, String>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn labels<VALUE: Into<BTreeMap<String, String>>>( &mut self, value: VALUE, ) -> &mut Self
Key/value pairs, allows resources to be easily filtered from the CLI.
Sourcepub fn build(&self) -> Result<ModelMetadata, ModelMetadataBuilderError>
pub fn build(&self) -> Result<ModelMetadata, ModelMetadataBuilderError>
Trait Implementations§
Source§impl Clone for ModelMetadataBuilder
impl Clone for ModelMetadataBuilder
Source§fn clone(&self) -> ModelMetadataBuilder
fn clone(&self) -> ModelMetadataBuilder
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 moreAuto Trait Implementations§
impl Freeze for ModelMetadataBuilder
impl RefUnwindSafe for ModelMetadataBuilder
impl Send for ModelMetadataBuilder
impl Sync for ModelMetadataBuilder
impl Unpin for ModelMetadataBuilder
impl UnwindSafe for ModelMetadataBuilder
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