pub struct Body {
pub bytes: Vec<u8>,
}Expand description
HTTP request body content.
Holds the raw bytes of the request body. Use RequestBuilder::body /
RequestBuilder::body_json / RequestBuilder::body_text on the builder
to populate; users normally do not construct Body directly.
Body is intentionally a single-value type (Vec<u8>) to match the
Request / Response design in hyperlane-core — see
hyperlane-standards §8.1. Higher-level framing (json vs text vs binary)
lives in the builder, not in the data type.
Fields§
§bytes: Vec<u8>Raw body bytes.
Implementations§
Trait Implementations§
Source§impl Display for Body
impl Display for Body
Source§fn fmt(&self, f: &mut Formatter<'_>) -> Result
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Formats the Body as its UTF-8 text, falling back to the debug
representation of the raw bytes when the body is not valid UTF-8.
§Arguments
&mut Formatter<'_>- A mutable reference to aFormatterused for writing the formatted string.
§Returns
fmt::Result- Afmt::Resultindicating whether the formatting was successful.
impl Eq for Body
impl StructuralPartialEq for Body
Auto Trait Implementations§
impl Freeze for Body
impl RefUnwindSafe for Body
impl Send for Body
impl Sync for Body
impl Unpin for Body
impl UnsafeUnpin for Body
impl UnwindSafe for Body
Blanket Implementations§
impl<T> AnySend for T
impl<T> AnySendClone for T
impl<T> AnySendSync for T
impl<T> AnySendSyncClone for T
impl<T> AnySync for T
impl<T> AnySyncClone for T
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