pub enum Payload {
Raw(RawPayload),
Http(HttpPayload),
}
Expand description
An output payload.
Variants§
Raw(RawPayload)
A raw payload.
The payload is an opaque collection of bytes.
Http(HttpPayload)
An HTTP payload.
Includes the relevant HTTP parameters (host, path, method, headers) and the payload body.
Implementations§
Source§impl Payload
impl Payload
Sourcepub fn payload_type(&self) -> PayloadType
pub fn payload_type(&self) -> PayloadType
Gets the type of this payload.
Sourcepub fn try_into_raw(self) -> Option<RawPayload>
pub fn try_into_raw(self) -> Option<RawPayload>
Returns the inner payload value, if this event is a RawPayload
.
Otherwise, None
is returned and the original payload is consumed.
Sourcepub fn try_into_http_payload(self) -> Option<HttpPayload>
pub fn try_into_http_payload(self) -> Option<HttpPayload>
Returns the inner payload value, if this event is an HttpPayload
.
Otherwise, None
is returned and the original payload is consumed.
Trait Implementations§
Source§impl Dispatchable for Payload
impl Dispatchable for Payload
Source§fn item_count(&self) -> usize
fn item_count(&self) -> usize
Returns the number of items in the dispatchable value. Read more
Auto Trait Implementations§
impl !Freeze for Payload
impl !RefUnwindSafe for Payload
impl Send for Payload
impl Sync for Payload
impl Unpin for Payload
impl !UnwindSafe for Payload
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request
Source§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Track for T
impl<T> Track for T
§fn track_allocations(self, token: AllocationGroupToken) -> Tracked<Self>
fn track_allocations(self, token: AllocationGroupToken) -> Tracked<Self>
Instruments this type by attaching the given allocation group token, returning a
Tracked
wrapper. Read more§fn in_current_allocation_group(self) -> Tracked<Self>
fn in_current_allocation_group(self) -> Tracked<Self>
Instruments this type by attaching the current allocation group, returning a
Tracked
wrapper. Read more