pub struct OutputMetadata {
pub content_type: &'static str,
pub set_content_type_if_empty: bool,
}Expand description
This struct encapsulates output payload metadata used by discovery.
The default implementation works for Json payloads.
Fields§
§content_type: &'static strContent type of the output.
By default, is application/json.
set_content_type_if_empty: boolIf true, the specified content-type is set even if the output is empty. This should be set to true only for encodings that can return a serialized empty byte array (e.g. Protobuf).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OutputMetadata
impl RefUnwindSafe for OutputMetadata
impl Send for OutputMetadata
impl Sync for OutputMetadata
impl Unpin for OutputMetadata
impl UnwindSafe for OutputMetadata
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> 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