Struct CompatBool
pub struct CompatBool(pub bool);Expand description
Encodes like rlp 0.4 (false → 0x00), decodes permissively
(0x00/0x01/0x80) so peers on either side of the encoding change
stay interoperable.
Tuple Fields§
§0: boolTrait Implementations§
§impl Clone for CompatBool04
impl Clone for CompatBool04
§fn clone(&self) -> CompatBool04
fn clone(&self) -> CompatBool04
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for CompatBool04
impl Debug for CompatBool04
§impl Decodable for CompatBool04
impl Decodable for CompatBool04
§fn decode(rlp: &Rlp<'_>) -> Result<CompatBool04, DecoderError>
fn decode(rlp: &Rlp<'_>) -> Result<CompatBool04, DecoderError>
Decode a value from RLP bytes
§impl Default for CompatBool04
impl Default for CompatBool04
§fn default() -> CompatBool04
fn default() -> CompatBool04
Returns the “default value” for a type. Read more
§impl Encodable for CompatBool04
impl Encodable for CompatBool04
§fn rlp_append(&self, s: &mut RlpStream)
fn rlp_append(&self, s: &mut RlpStream)
Append a value to the stream
§impl Hash for CompatBool04
impl Hash for CompatBool04
§impl MallocSizeOf for CompatBool04
impl MallocSizeOf for CompatBool04
§impl PartialEq for CompatBool04
impl PartialEq for CompatBool04
impl Copy for CompatBool04
impl Eq for CompatBool04
impl StructuralPartialEq for CompatBool04
Auto Trait Implementations§
impl Freeze for CompatBool04
impl RefUnwindSafe for CompatBool04
impl Send for CompatBool04
impl Sync for CompatBool04
impl Unpin for CompatBool04
impl UnwindSafe for CompatBool04
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