Struct aws_smithy_eventstream::frame::Message
source · [−]#[non_exhaustive]pub struct Message { /* private fields */ }
Expand description
Event Stream message.
Implementations
sourceimpl Message
impl Message
sourcepub fn new(payload: impl Into<Bytes>) -> Message
pub fn new(payload: impl Into<Bytes>) -> Message
Creates a new message with the given payload
. Headers can be added later.
sourcepub fn new_from_parts(headers: Vec<Header>, payload: impl Into<Bytes>) -> Self
pub fn new_from_parts(headers: Vec<Header>, payload: impl Into<Bytes>) -> Self
Creates a message with the given headers
and payload
.
sourcepub fn add_header(self, header: Header) -> Self
pub fn add_header(self, header: Header) -> Self
Adds a header to the message.
Trait Implementations
sourceimpl<'a> Arbitrary<'a> for Message
impl<'a> Arbitrary<'a> for Message
sourcefn arbitrary(unstruct: &mut Unstructured<'a>) -> Result<Self>
fn arbitrary(unstruct: &mut Unstructured<'a>) -> Result<Self>
Generate an arbitrary value of Self
from the given unstructured data. Read more
sourcefn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Generate an arbitrary value of Self
from the entirety of the given unstructured data. Read more
impl StructuralPartialEq for Message
Auto Trait Implementations
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnwindSafe for Message
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more