pub struct PutPayload(/* private fields */);Expand description
A cheaply cloneable, ordered collection of Bytes
Implementations§
Source§impl PutPayload
impl PutPayload
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new empty PutPayload
Sourcepub fn from_static(s: &'static [u8]) -> Self
pub fn from_static(s: &'static [u8]) -> Self
Creates a PutPayload from a static slice
Sourcepub fn from_bytes(s: Bytes) -> Self
pub fn from_bytes(s: Bytes) -> Self
Creates a PutPayload from a Bytes
Sourcepub fn content_length(&self) -> usize
pub fn content_length(&self) -> usize
Returns the total length of the Bytes in this payload
Sourcepub fn iter(&self) -> PutPayloadIter<'_> ⓘ
pub fn iter(&self) -> PutPayloadIter<'_> ⓘ
Returns an iterator over the Bytes in this payload
Trait Implementations§
Source§impl AsRef<[Bytes]> for PutPayload
impl AsRef<[Bytes]> for PutPayload
Source§impl Clone for PutPayload
impl Clone for PutPayload
Source§fn clone(&self) -> PutPayload
fn clone(&self) -> PutPayload
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PutPayload
impl Debug for PutPayload
Source§impl Default for PutPayload
impl Default for PutPayload
Source§impl From<&'static [u8]> for PutPayload
impl From<&'static [u8]> for PutPayload
Source§impl From<&'static str> for PutPayload
impl From<&'static str> for PutPayload
Source§impl From<Bytes> for PutPayload
impl From<Bytes> for PutPayload
Source§impl From<PutPayload> for Bytes
impl From<PutPayload> for Bytes
Source§fn from(value: PutPayload) -> Self
fn from(value: PutPayload) -> Self
Converts to this type from the input type.
Source§impl From<PutPayloadMut> for PutPayload
impl From<PutPayloadMut> for PutPayload
Source§fn from(value: PutPayloadMut) -> Self
fn from(value: PutPayloadMut) -> Self
Converts to this type from the input type.
Source§impl From<String> for PutPayload
impl From<String> for PutPayload
Source§impl FromIterator<Bytes> for PutPayload
impl FromIterator<Bytes> for PutPayload
Source§impl FromIterator<u8> for PutPayload
impl FromIterator<u8> for PutPayload
Source§impl<'a> IntoIterator for &'a PutPayload
impl<'a> IntoIterator for &'a PutPayload
Auto Trait Implementations§
impl Freeze for PutPayload
impl RefUnwindSafe for PutPayload
impl Send for PutPayload
impl Sync for PutPayload
impl Unpin for PutPayload
impl UnwindSafe for PutPayload
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> 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