pub struct Drain;Expand description
A codec that always matches everything and writes nothing.
Trait Implementations§
Source§impl<O: Ops> Codec<O> for Drain
impl<O: Ops> Codec<O> for Drain
Source§fn codec_read(_ops: &O) -> ReadResult<Self>
fn codec_read(_ops: &O) -> ReadResult<Self>
Convert from a data format to a data structure.
Source§fn codec_write(&self) -> WriteResult<O>
fn codec_write(&self) -> WriteResult<O>
Convert from a data structure to a data format.
type Incomplete = Result<Self, ReadError>
impl Copy for Drain
impl Eq for Drain
Source§impl<O: Ops> MapCodec<O> for Drain
impl<O: Ops> MapCodec<O> for Drain
fn codec_read_map_item( _incomplete: &mut <Self as Codec<O>>::Incomplete, _k: &O, _v: &O, )
fn codec_write_to_map(&self, _map: &mut Vec<(O, O)>) -> WriteResult<()>
Source§fn get_and_reset_result(
_incomplete: &mut <Self as Codec<O>>::Incomplete,
) -> ReadResult<()>
fn get_and_reset_result( _incomplete: &mut <Self as Codec<O>>::Incomplete, ) -> ReadResult<()>
For normal structs, this sets
incomplete.__result = Ok(()) and returns
the previous value of __result.impl StructuralPartialEq for Drain
Auto Trait Implementations§
impl Forget for Drain
impl Freeze for Drain
impl Move for Drain
impl RefUnwindSafe for Drain
impl Send for Drain
impl Sync for Drain
impl Unpin for Drain
impl UnsafeUnpin for Drain
impl UnwindSafe for Drain
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.