pub struct Jpeg<'a> {
pub data: Vec<JpegData<'a>>,
}Fields§
§data: Vec<JpegData<'a>>Implementations§
Source§impl<'a> Jpeg<'a>
impl<'a> Jpeg<'a>
pub fn parser<I>() -> impl Parser<Input = I, Output = Jpeg<'a>> + 'awhere
I: RangeStream<Item = u8, Range = &'a [u8]> + 'a,
I::Error: ParseError<I::Item, I::Range, I::Position>,
Sourcepub fn write<W: WriteBytesExt>(&self, writer: &mut W) -> Result<()>
pub fn write<W: WriteBytesExt>(&self, writer: &mut W) -> Result<()>
Writes the binary representation of the Jpeg out to a file.
Note that the resulting file is a valid JPEG file.
Sourcepub fn inject_marked_data(&mut self, marked_data: MarkedData<'a>)
pub fn inject_marked_data(&mut self, marked_data: MarkedData<'a>)
Writes or replaces the existing MarkedData section with marked_data.
Sourcepub fn inject_marker_from(&mut self, src: &Jpeg<'a>, marker: u8) -> bool
pub fn inject_marker_from(&mut self, src: &Jpeg<'a>, marker: u8) -> bool
Injects a marker from src as per [inject_marked_data].
Returns true on success.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Jpeg<'a>
impl<'a> RefUnwindSafe for Jpeg<'a>
impl<'a> Send for Jpeg<'a>
impl<'a> Sync for Jpeg<'a>
impl<'a> Unpin for Jpeg<'a>
impl<'a> UnwindSafe for Jpeg<'a>
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> 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