pub enum SparseEdit {
Sparse(ByteChanges),
Complete(BinaryData),
}Expand description
An image change that is potentially sparse.
See also: [Editor::apply_sparse()]
Variants§
Sparse(ByteChanges)
The operations can be applied to the image via only changing a few
bytes. The apply_to() function can be used to
apply these changes.
Complete(BinaryData)
The operations require to completely rewrite the image.
Implementations§
Source§impl SparseEdit
impl SparseEdit
Sourcepub async fn apply_to(&self, file: File) -> Result<EditOutcome, Error>
pub async fn apply_to(&self, file: File) -> Result<EditOutcome, Error>
Apply sparse changes if applicable.
If the type does not carry sparse changes, the function will return an
EditOutcome::Unchanged and the complete image needs to be rewritten.
Trait Implementations§
Source§impl Debug for SparseEdit
impl Debug for SparseEdit
Source§impl TryFrom<SparseEditorOutput> for SparseEdit
impl TryFrom<SparseEditorOutput> for SparseEdit
Auto Trait Implementations§
impl Freeze for SparseEdit
impl RefUnwindSafe for SparseEdit
impl Send for SparseEdit
impl Sync for SparseEdit
impl Unpin for SparseEdit
impl UnsafeUnpin for SparseEdit
impl UnwindSafe for SparseEdit
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> 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