pub struct EncData { /* private fields */ }
Expand description
EncData
is like Data
but the buffer contains transfer encoded data.
Clone
Data
is made to be cheap to clone and share.
For this it uses Arc
internally.
Implementations
sourceimpl EncData
impl EncData
sourcepub fn transfer_encoded_buffer(&self) -> &Arc<[u8]>
pub fn transfer_encoded_buffer(&self) -> &Arc<[u8]>
Access the raw transfer encoded data.
sourcepub fn media_type(&self) -> &MediaType
pub fn media_type(&self) -> &MediaType
Access the content type.
sourcepub fn encoding(&self) -> TransferEncoding
pub fn encoding(&self) -> TransferEncoding
Access the transfer encoding used to encode the buffer.
sourcepub fn content_id(&self) -> &ContentId
pub fn content_id(&self) -> &ContentId
Access the content id.
The content id is for the data itself so it should not change just because the data had been transfer encoded.
Note about fixed newlines:
The encoding functions of this library will always “fix” line endings even if the transfer encoding is to not have any encoding, it could be said that this is a modification of the data and as such the content id should change. But as this is done always and as such only the transfer encoded data is “send” out this works out fine.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for EncData
impl Send for EncData
impl Sync for EncData
impl Unpin for EncData
impl UnwindSafe for EncData
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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