pub struct ConversionResponse {
    pub types: Option<TypeMeta>,
    pub uid: String,
    pub result: Status,
    pub converted_objects: Vec<Value>,
}
Expand description

Part of ConversionReview which is set on output (i.e. generated by conversion webhook)

Fields§

§types: Option<TypeMeta>

TypeMeta of the ConversionReview this response was derived from

This field is copied from the corresponding ConversionRequest. It is not part of the Kubernetes API, it’s consumed only by kube.

§uid: String

Copy of .request.uid

§result: Status

Outcome of the conversion operation

Success: all objects were successfully converted Failure: at least one object could not be converted. It is recommended that conversion fails as rare as possible.

§converted_objects: Vec<Value>

Converted objects

This field should contain objects in the same order as in the request Should be empty if conversion failed.

Implementations§

Creates a new response, matching provided request

This response must be finalized with one of:

Creates successful conversion response

converted_objects must specify objects in the exact same order as on input.

Creates failed conversion response (discouraged)

request_uid must be equal to the .uid field in the request. message and reason will be returned to the apiserver.

Creates failed conversion response, not matched with any request

You should only call this function when request couldn’t be parsed into ConversionRequest. Otherwise use error.

Converts response into a ConversionReview value, ready to be sent as a response

Trait Implementations§

Deserialize this value from the given Serde deserializer. Read more
Converts to this type from the input type.
Converts to this type from the input type.
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.