pub struct Scale {
pub metadata: ObjectMeta,
pub spec: Option<ScaleSpec>,
pub status: Option<ScaleStatus>,
}
client
only.Expand description
Scale represents a scaling request for a resource.
Fields
metadata: ObjectMeta
Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
spec: Option<ScaleSpec>
defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
status: Option<ScaleStatus>
current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Scale
impl<'de> Deserialize<'de> for Scale
sourcefn deserialize<D>(
deserializer: D
) -> Result<Scale, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D
) -> Result<Scale, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Resource for Scale
impl Resource for Scale
sourceconst API_VERSION: &'static str
const API_VERSION: &'static str
The API version of the resource. This is a composite of Resource::GROUP
and Resource::VERSION
(eg "apiextensions.k8s.io/v1beta1"
)
or just the version for resources without a group (eg "v1"
). Read more
sourceconst GROUP: &'static str
const GROUP: &'static str
The group of the resource, or the empty string if the resource doesn’t have a group.
sourceconst URL_PATH_SEGMENT: &'static str
const URL_PATH_SEGMENT: &'static str
The URL path segment used to construct URLs related to this resource. Read more
type Scope = SubResourceScope
type Scope = SubResourceScope
Indicates whether the resource is namespace-scoped or cluster-scoped or a subresource. Read more
sourceimpl Serialize for Scale
impl Serialize for Scale
sourcefn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for Scale
Auto Trait Implementations
impl RefUnwindSafe for Scale
impl Send for Scale
impl Sync for Scale
impl Unpin for Scale
impl UnwindSafe for Scale
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<K> Resource for K where
K: Metadata<Ty = ObjectMeta>,
impl<K> Resource for K where
K: Metadata<Ty = ObjectMeta>,
type DynamicType = ()
type DynamicType = ()
Type information for types that do not know their resource information at compile time. Read more
sourcefn api_version(&()) -> Cow<'_, str>
fn api_version(&()) -> Cow<'_, str>
Returns apiVersion of this object
sourcefn meta(&self) -> &ObjectMeta
fn meta(&self) -> &ObjectMeta
Metadata that all persisted resources must have
sourcefn meta_mut(&mut self) -> &mut ObjectMeta
fn meta_mut(&mut self) -> &mut ObjectMeta
Metadata that all persisted resources must have
sourcefn url_path(dt: &Self::DynamicType, namespace: Option<&str>) -> String
fn url_path(dt: &Self::DynamicType, namespace: Option<&str>) -> String
Creates a url path for http requests for this resource
sourcefn object_ref(&self, dt: &Self::DynamicType) -> ObjectReference
fn object_ref(&self, dt: &Self::DynamicType) -> ObjectReference
Generates an object reference for the resource
sourcefn controller_owner_ref(&self, dt: &Self::DynamicType) -> Option<OwnerReference>
fn controller_owner_ref(&self, dt: &Self::DynamicType) -> Option<OwnerReference>
Generates a controller owner reference pointing to this resource Read more
sourceimpl<K> ResourceExt for K where
K: Resource,
impl<K> ResourceExt for K where
K: Resource,
sourcefn name(&self) -> String
fn name(&self) -> String
Returns the name of the resource, panicking if it is
missing. Use this function if you know that name is set, for example
when resource was received from the apiserver.
Because of .metadata.generateName
field, in other contexts name
may be missing. Read more
sourcefn resource_version(&self) -> Option<String>
fn resource_version(&self) -> Option<String>
The resource version
sourcefn uid(&self) -> Option<String>
fn uid(&self) -> Option<String>
Unique ID (if you delete resource and then create a new resource with the same name, it will have different ID) Read more
sourcefn labels_mut(&mut self) -> &mut BTreeMap<String, String>
fn labels_mut(&mut self) -> &mut BTreeMap<String, String>
Provides mutable access to the labels
sourcefn annotations(&self) -> &BTreeMap<String, String>
fn annotations(&self) -> &BTreeMap<String, String>
Returns resource annotations
sourcefn annotations_mut(&mut self) -> &mut BTreeMap<String, String>
fn annotations_mut(&mut self) -> &mut BTreeMap<String, String>
Provider mutable access to the annotations
sourcefn owner_references(&self) -> &[OwnerReference]
fn owner_references(&self) -> &[OwnerReference]
Returns resource owner references
sourcefn owner_references_mut(&mut self) -> &mut Vec<OwnerReference, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
fn owner_references_mut(&mut self) -> &mut Vec<OwnerReference, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Provides mutable access to the owner references
sourcefn finalizers(&self) -> &[String]
fn finalizers(&self) -> &[String]
Returns resource finalizers
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more