pub enum OutputError {
MalformedBuffer,
EncodingFailed(String),
}Expand description
Failure while writing the stego image to disk.
The only failure of the pipeline that no lower layer can report: layers 1 to 4 read images and never write them, so there is no error type to reuse here.
Variants§
MalformedBuffer
The sample buffer did not match the geometry it claims to have.
Unreachable for a buffer that came out of
crate::image_io::validate::load_and_validate, whose length is fixed
by the decoder. Kept as a variant rather than as an assertion because the
encoder’s constructor is fallible and swallowing that would mean writing
a file the caller believes is a valid container.
EncodingFailed(String)
The PNG encoder or the filesystem refused the write.
Trait Implementations§
Source§impl Debug for OutputError
impl Debug for OutputError
Source§impl Display for OutputError
impl Display for OutputError
Source§impl Error for OutputError
impl Error for OutputError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<OutputError> for GenerateError
impl From<OutputError> for GenerateError
Source§fn from(err: OutputError) -> Self
fn from(err: OutputError) -> Self
Converts to this type from the input type.
Source§impl From<OutputError> for PipelineError
impl From<OutputError> for PipelineError
Source§fn from(err: OutputError) -> Self
fn from(err: OutputError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for OutputError
impl RefUnwindSafe for OutputError
impl Send for OutputError
impl Sync for OutputError
impl Unpin for OutputError
impl UnsafeUnpin for OutputError
impl UnwindSafe for OutputError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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