pub struct Part {
pub body_data: Bytes,
/* private fields */
}
Fields§
§body_data: Bytes
Implementations§
Source§impl Part
impl Part
pub fn body(&self) -> &[u8] ⓘ
pub fn into_body(self) -> Bytes
pub fn body_len(&self) -> usize
Sourcepub fn header_lines(&self) -> impl Iterator<Item = Result<&str, Utf8Error>>
pub fn header_lines(&self) -> impl Iterator<Item = Result<&str, Utf8Error>>
Returns an iterator over all the headers lines, with their line endings trimmed. Since many jpeg streams uses Headers separated by ‘=’ instead of Https ‘:’ this is currently the only way to get the headers.
pub fn headers(&self) -> HeaderMap<HeaderValue>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Part
impl RefUnwindSafe for Part
impl Send for Part
impl Sync for Part
impl Unpin for Part
impl UnwindSafe for Part
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> 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