pub enum LzssError<R, W> {
ReadError(R),
WriteError(W),
}
Expand description
This represents either an read or write error.
Variants§
Implementations§
source§impl<R, W> LzssError<R, W>
impl<R, W> LzssError<R, W>
sourcepub fn map_read_error<E, O: FnOnce(R) -> E>(self, op: O) -> LzssError<E, W>
pub fn map_read_error<E, O: FnOnce(R) -> E>(self, op: O) -> LzssError<E, W>
Maps a LzssError<R, W>
to LzssError<E, W>
by applying a function to a contained read error value, leaving an write error value untouched.
sourcepub fn map_write_error<E, O: FnOnce(W) -> E>(self, op: O) -> LzssError<R, E>
pub fn map_write_error<E, O: FnOnce(W) -> E>(self, op: O) -> LzssError<R, E>
Maps a LzssError<R, W>
to LzssError<R, E>
by applying a function to a contained write error value, leaving an read error value untouched.
Trait Implementations§
source§impl<R, W> Error for LzssError<R, W>where
R: Error + 'static,
W: Error + 'static,
Available on crate feature std
only.
impl<R, W> Error for LzssError<R, W>where R: Error + 'static, W: Error + 'static,
Available on crate feature
std
only.source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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<R: PartialEq, W: PartialEq> PartialEq<LzssError<R, W>> for LzssError<R, W>
impl<R: PartialEq, W: PartialEq> PartialEq<LzssError<R, W>> for LzssError<R, W>
impl<R: Eq, W: Eq> Eq for LzssError<R, W>
impl<R, W> StructuralEq for LzssError<R, W>
impl<R, W> StructuralPartialEq for LzssError<R, W>
Auto Trait Implementations§
impl<R, W> RefUnwindSafe for LzssError<R, W>where R: RefUnwindSafe, W: RefUnwindSafe,
impl<R, W> Send for LzssError<R, W>where R: Send, W: Send,
impl<R, W> Sync for LzssError<R, W>where R: Sync, W: Sync,
impl<R, W> Unpin for LzssError<R, W>where R: Unpin, W: Unpin,
impl<R, W> UnwindSafe for LzssError<R, W>where R: UnwindSafe, W: UnwindSafe,
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