Trait bs58::decode::DecodeTarget
source · pub trait DecodeTarget {
// Required method
fn decode_with(
&mut self,
max_len: usize,
f: impl for<'a> FnOnce(&'a mut [u8]) -> Result<usize>
) -> Result<usize>;
}
Expand description
Represents a buffer that can be decoded into. See DecodeBuilder::onto
and the provided
implementations for more details.
Required Methods§
sourcefn decode_with(
&mut self,
max_len: usize,
f: impl for<'a> FnOnce(&'a mut [u8]) -> Result<usize>
) -> Result<usize>
fn decode_with( &mut self, max_len: usize, f: impl for<'a> FnOnce(&'a mut [u8]) -> Result<usize> ) -> Result<usize>
Decodes into this buffer, provides the maximum length for implementations that wish to preallocate space, along with a function that will write bytes into the buffer and return the length written to it.
Object Safety§
This trait is not object safe.
Implementations on Foreign Types§
source§impl DecodeTarget for Vec<u8>
Available on crate feature alloc
only.
impl DecodeTarget for Vec<u8>
Available on crate feature
alloc
only.source§impl DecodeTarget for SliceVec<'_, u8>
Available on crate feature tinyvec
only.
impl DecodeTarget for SliceVec<'_, u8>
Available on crate feature
tinyvec
only.source§impl DecodeTarget for [u8]
impl DecodeTarget for [u8]
source§impl<A: Array<Item = u8>> DecodeTarget for SmallVec<A>
Available on crate feature smallvec
only.
impl<A: Array<Item = u8>> DecodeTarget for SmallVec<A>
Available on crate feature
smallvec
only.source§impl<A: Array<Item = u8>> DecodeTarget for TinyVec<A>
Available on crate features tinyvec
and alloc
only.
impl<A: Array<Item = u8>> DecodeTarget for TinyVec<A>
Available on crate features
tinyvec
and alloc
only.source§impl<A: Array<Item = u8>> DecodeTarget for ArrayVec<A>
Available on crate feature tinyvec
only.
impl<A: Array<Item = u8>> DecodeTarget for ArrayVec<A>
Available on crate feature
tinyvec
only.