CheckResponseExt

Trait CheckResponseExt 

Source
pub trait CheckResponseExt: Sealed {
    // Required methods
    fn new() -> Self;
    fn with_status(status: Status) -> Self;
    fn set_status(&mut self, status: Status) -> &mut Self;
    fn set_dynamic_metadata(
        &mut self,
        dynamic_metadata: Option<Struct>,
    ) -> &mut Self;
    fn set_http_response(
        &mut self,
        http_response: impl ToHttpResponse,
    ) -> &mut Self;
}
Expand description

Extension trait aiming to provide convenient associated fn’s and methods to create and edit pb::CheckResponse.

This trait is sealed and not meant to be implemented outside of envoy-types.

Required Methods§

Source

fn new() -> Self

Create a new, empty pb::CheckResponse.

Please note that if you return an empty pb::CheckResponse, the request will be denied, since there will not be an inner Ok rpc::Status.

Source

fn with_status(status: Status) -> Self

Create a new pb::CheckResponse with the rpc::Status’s code and message matching those of the tonic::Status provided.

Please note that tonic::Status’s details will not be considered.

Source

fn set_status(&mut self, status: Status) -> &mut Self

Set the pb::CheckResponse inner rpc::Status’s code and message as those of the tonic::Status provided.

Please note that tonic::Status’s details will not be considered.

Source

fn set_dynamic_metadata( &mut self, dynamic_metadata: Option<Struct>, ) -> &mut Self

Set the pb::CheckResponse’s dynamic_metadata field.

Source

fn set_http_response(&mut self, http_response: impl ToHttpResponse) -> &mut Self

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.

Implementors§