[−][src]Struct img_parts::jpeg::JpegSegment
The representation of a segment making up a Jpeg
Implementations
impl JpegSegment
[src]
pub fn new(marker: u8) -> JpegSegment
[src]
Construct an empty JpegSegment
pub fn new_with_contents(marker: u8, contents: Bytes) -> JpegSegment
[src]
Construct a JpegSegment
with contents
pub fn new_with_entropy(
marker: u8,
contents: Bytes,
entropy: Bytes
) -> JpegSegment
[src]
marker: u8,
contents: Bytes,
entropy: Bytes
) -> JpegSegment
Construct a JpegSegment
with contents
and entropy
pub fn len(&self) -> usize
[src]
Get the size of this JpegSegment
once it is encoded, entropy
excluded.
The size is the sum of:
- The marker (2 bytes).
- The length (2 bytes) if this marker has a length.
- The size of the content.
pub fn len_with_entropy(&self) -> usize
[src]
Get the size of this JpegSegment
once it is encoded, including
the Entropy
.
The size is the sum of:
- The marker (2 bytes).
- The length (2 bytes) if this marker has a length.
- The size of the content.
- The size of the encoded entropy data.
pub fn marker(&self) -> u8
[src]
Get the second byte of the marker of this JpegSegment
pub fn contents(&self) -> &Bytes
[src]
Get the content of this JpegSegment
pub fn has_entropy(&self) -> bool
[src]
Check if this JpegSegment
has entropy
pub fn encoder(self) -> ImageEncoder<Self>ⓘNotable traits for ImageEncoder<I>
impl<I: EncodeAt> Iterator for ImageEncoder<I> type Item = Bytes;
[src]
Notable traits for ImageEncoder<I>
impl<I: EncodeAt> Iterator for ImageEncoder<I> type Item = Bytes;
Create an encoder for this JpegSegment
Trait Implementations
impl Clone for JpegSegment
[src]
fn clone(&self) -> JpegSegment
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for JpegSegment
[src]
impl PartialEq<JpegSegment> for JpegSegment
[src]
fn eq(&self, other: &JpegSegment) -> bool
[src]
fn ne(&self, other: &JpegSegment) -> bool
[src]
impl StructuralPartialEq for JpegSegment
[src]
Auto Trait Implementations
impl RefUnwindSafe for JpegSegment
impl Send for JpegSegment
impl Sync for JpegSegment
impl Unpin for JpegSegment
impl UnwindSafe for JpegSegment
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,