pub struct Encoder { /* private fields */ }
Implementations§
Source§impl Encoder
impl Encoder
pub fn new() -> Self
pub fn size(&self) -> usize
pub fn write_bool(&mut self, value: bool)
pub fn write_u8(&mut self, value: u8)
pub fn write_i16(&mut self, v: i16)
pub fn write_i32(&mut self, v: i32)
pub fn write_i64(&mut self, v: i64)
pub fn write_u16(&mut self, v: u16)
pub fn write_u32(&mut self, v: u32)
pub fn write_u64(&mut self, v: u64)
pub fn write_bytes(&mut self, bytes: &[u8])
pub fn write_var_int(&mut self, value: i64) -> Result<(), Error>
pub fn write_var_string(&mut self, v: &str)
pub fn write_fixed_string( &mut self, v: &Option<String>, length: usize, ) -> Result<(), CodecError>
pub fn write_var_bytes(&mut self, bytes: &[u8]) -> Result<(), Error>
pub fn write_serializable_fixed<S: NeoSerializable>(&mut self, value: &S)
pub fn write_serializable_list_fixed<S: NeoSerializable>(&mut self, value: &[S])
pub fn write_serializable_variable_bytes<S: NeoSerializable>( &mut self, values: &S, ) -> Result<(), Error>
pub fn write_serializable_variable_list<S: NeoSerializable>( &mut self, values: &[S], ) -> Result<(), Error>
pub fn write_serializable_variable_list_bytes<S: NeoSerializable>( &mut self, values: &[S], ) -> Result<(), Error>
pub fn reset(&mut self)
pub fn to_bytes(&self) -> Vec<u8> ⓘ
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Encoder
impl<'de> Deserialize<'de> for Encoder
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hasher for Encoder
impl Hasher for Encoder
1.26.0 · Source§fn write_u128(&mut self, i: u128)
fn write_u128(&mut self, i: u128)
Writes a single
u128
into this hasher.1.3.0 · Source§fn write_usize(&mut self, i: usize)
fn write_usize(&mut self, i: usize)
Writes a single
usize
into this hasher.1.26.0 · Source§fn write_i128(&mut self, i: i128)
fn write_i128(&mut self, i: i128)
Writes a single
i128
into this hasher.1.3.0 · Source§fn write_isize(&mut self, i: isize)
fn write_isize(&mut self, i: isize)
Writes a single
isize
into this hasher.Source§fn write_length_prefix(&mut self, len: usize)
fn write_length_prefix(&mut self, len: usize)
🔬This is a nightly-only experimental API. (
hasher_prefixfree_extras
)Writes a length prefix into this hasher, as part of being prefix-free. Read more
impl Eq for Encoder
impl StructuralPartialEq for Encoder
Auto Trait Implementations§
impl Freeze for Encoder
impl RefUnwindSafe for Encoder
impl Send for Encoder
impl Sync for Encoder
impl Unpin for Encoder
impl UnwindSafe for Encoder
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.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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