Crate binary_codec_sv2

Source
Expand description
SERDE    <-> Sv2
bool     <-> BOOL
u8       <-> U8
u16      <-> U16
U24      <-> U24
u32      <-> u32
f32      <-> f32 // not in the spec but used
u64      <-> u64 // not in the spec but used
U256     <-> U256
Str0255  <-> STRO_255
Signature<-> SIGNATURE
B032     <-> B0_32 // not in the spec but used
B0255    <-> B0_255
B064K    <-> B0_64K
B016M    <-> B0_16M
[u8]     <-> BYTES
Pubkey   <-> PUBKEY
Seq0255  <-> SEQ0_255[T]
Seq064K  <-> SEQ0_64K[T]

Modules§

decodable
encodable

Structs§

CVec
CVec2
Seq0255
The liftime is here only for type compatibility with serde-sv2
Seq064K
The liftime is here only for type compatibility with serde-sv2
Sv2Option
The liftime is here only for type compatibility with serde-sv2
U24

Enums§

CError
FFI-safe Error
EncodableField
Error

Traits§

Decodable
Implmented by all the decodable structure, it can be derived for every structure composed only by primitives or other Decodable.
Encodable
Fixed
Implemented by all the primitives with a fixed size
GetMarker
GetSize
Return the encoded byte size of an Encodable comprehensive of the header, if any
SizeHint
Return the encoded byte size or a Decodable
Sv2DataType

Functions§

_c_export_cvec
_c_export_cvec2
_c_export_u24
cvec2_push
The caller is reponsible for NOT adding duplicate cvecs to the cvec2 structure, as this can lead to double free errors when the message is dropped.
cvec_from_buffer
Given a C allocated buffer return a rust allocated CVec
free_vec
free_vec_2
from_bytes
init_cvec2
Safety
to_bytes
to_writer

Type Aliases§

B016M
B0255
B032
B064K
PubKey
ShortTxId
Signature
Str0255
U32AsRef
U256