pub trait ResourceBuilder: Sized {
Show 14 methods
// Required methods
fn namespace(self, namespace: impl ToString) -> Self;
fn owner(self, owner: OwnerReference) -> Self;
fn label(self, key: impl ToString, value: impl ToString) -> Self;
fn labels(
self,
labels: impl IntoIterator<Item = (impl ToString, impl ToString)>,
) -> Self;
fn annotation(self, key: impl ToString, value: impl ToString) -> Self;
fn annotations(
self,
annotations: impl IntoIterator<Item = (impl ToString, impl ToString)>,
) -> Self;
fn with_resource_version(self, resource_version: String) -> Self;
// Provided methods
fn metadata(name: impl ToString) -> ObjectMeta { ... }
fn app_name(self, name: impl ToString) -> Self { ... }
fn app_instance(self, instance: impl ToString) -> Self { ... }
fn app_version(self, version: impl ToString) -> Self { ... }
fn app_component(self, component: impl ToString) -> Self { ... }
fn app_part_of(self, part_of: impl ToString) -> Self { ... }
fn app_managed_by(self, managed_by: impl ToString) -> Self { ... }
}
Required Methods§
Sourcefn owner(self, owner: OwnerReference) -> Self
fn owner(self, owner: OwnerReference) -> Self
Set the owner for this object
Sourcefn label(self, key: impl ToString, value: impl ToString) -> Self
fn label(self, key: impl ToString, value: impl ToString) -> Self
Set one label for this object.
For settins multiple lables at once prefer labels()
Sourcefn labels(
self,
labels: impl IntoIterator<Item = (impl ToString, impl ToString)>,
) -> Self
fn labels( self, labels: impl IntoIterator<Item = (impl ToString, impl ToString)>, ) -> Self
Set labels for this object
Sourcefn annotation(self, key: impl ToString, value: impl ToString) -> Self
fn annotation(self, key: impl ToString, value: impl ToString) -> Self
Set one annotation for this object.
For settins multiple lables at once prefer labels()
Sourcefn annotations(
self,
annotations: impl IntoIterator<Item = (impl ToString, impl ToString)>,
) -> Self
fn annotations( self, annotations: impl IntoIterator<Item = (impl ToString, impl ToString)>, ) -> Self
Set annotations for this object
fn with_resource_version(self, resource_version: String) -> Self
Provided Methods§
fn metadata(name: impl ToString) -> ObjectMeta
Sourcefn app_instance(self, instance: impl ToString) -> Self
fn app_instance(self, instance: impl ToString) -> Self
Set recommended label ‘app.kubernetes.io/instance’
Sourcefn app_version(self, version: impl ToString) -> Self
fn app_version(self, version: impl ToString) -> Self
Set recommended label ‘app.kubernetes.io/version’
Sourcefn app_component(self, component: impl ToString) -> Self
fn app_component(self, component: impl ToString) -> Self
Set recommended label ‘app.kubernetes.io/component’
Sourcefn app_part_of(self, part_of: impl ToString) -> Self
fn app_part_of(self, part_of: impl ToString) -> Self
Set recommended label ‘app.kubernetes.io/part-of’
Sourcefn app_managed_by(self, managed_by: impl ToString) -> Self
fn app_managed_by(self, managed_by: impl ToString) -> Self
Set recommended label ‘app.kubernetes.io/managed-by’
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.