Enum diny_core::backend::StartDecodeStatus [−][src]
pub enum StartDecodeStatus<Dta, Dec, Err> {
Fini(Dta),
Pending(Dec),
Error(Err),
}
Expand description
Contains the resultant state of a start_decode opertation.
This is very simlar to the Poll enum, except that it is flattened and that in the event that the operation is pending, the decode state required to resume the operation is returned.
Variants
The operation has successfully completed decoding the data.
The operation resulted in an error.
Implementations
pub fn bimap<Fdta, Gdec, F, G>(
self,
f: F,
g: G
) -> StartDecodeStatus<Fdta, Gdec, Err> where
F: FnOnce(Dta) -> Fdta,
G: FnOnce(Dec) -> Gdec,
pub fn bimap<Fdta, Gdec, F, G>(
self,
f: F,
g: G
) -> StartDecodeStatus<Fdta, Gdec, Err> where
F: FnOnce(Dta) -> Fdta,
G: FnOnce(Dec) -> Gdec,
Convenience method for functorially mapping either variant to a new status.
pub fn and_then<Fdta, Gdec, F, G>(
self,
f: F,
g: G
) -> StartDecodeStatus<Fdta, Gdec, Err> where
F: FnOnce(Dta) -> StartDecodeStatus<Fdta, Gdec, Err>,
G: FnOnce(Dec) -> Gdec,
pub fn and_then<Fdta, Gdec, F, G>(
self,
f: F,
g: G
) -> StartDecodeStatus<Fdta, Gdec, Err> where
F: FnOnce(Dta) -> StartDecodeStatus<Fdta, Gdec, Err>,
G: FnOnce(Dec) -> Gdec,
Convenience method for functorially mapping either variant to a new status.