pub struct Header { /* private fields */ }Expand description
The plaintext ratchet header, transmitted NIP-44-encrypted in each message. Wire field names are camelCase to match the reference implementation’s JSON exactly (this is the interop-critical type).
Trait Implementations§
impl Eq for Header
impl StructuralPartialEq for Header
Source§impl ToJson for Header
impl ToJson for Header
Source§fn write_json<__W: JsonWrite + ?Sized>(
&self,
__w: &mut __W,
) -> Result<(), __W::Error>
fn write_json<__W: JsonWrite + ?Sized>( &self, __w: &mut __W, ) -> Result<(), __W::Error>
Serialize
self into w.Source§const MIN_SERIALIZED_LEN: usize = 0
const MIN_SERIALIZED_LEN: usize = 0
Lower bound on the number of bytes
write_json will emit. Read moreSource§const MAX_SERIALIZED_LEN: usize = 0
const MAX_SERIALIZED_LEN: usize = 0
Upper bound on the bytes a single
write_json call emits, used by
sequence impls to pre-reserve buffer capacity. 0 means “no useful
upper bound” — sequence impls skip the reservation in that case. Read moreSource§unsafe fn write_json_in_reserved<W>(
&self,
w: &mut W,
) -> Result<(), <W as JsonWrite>::Error>
unsafe fn write_json_in_reserved<W>( &self, w: &mut W, ) -> Result<(), <W as JsonWrite>::Error>
Serialize
self into w ASSUMING the caller has already reserved
at least MAX_SERIALIZED_LEN writable bytes in the sink. Used by
[[T]::write_json] after its reserve_hint call so the per-element
path skips its own cap checks. Read moreSource§const NEEDS_VALIDATION: bool = false
const NEEDS_VALIDATION: bool = false
Whether this type requires a pre-scan validation pass before
the per-element fast path can be entered. Defaults to
false. Read moreAuto Trait Implementations§
impl Freeze for Header
impl RefUnwindSafe for Header
impl Send for Header
impl Sync for Header
impl Unpin for Header
impl UnsafeUnpin for Header
impl UnwindSafe for Header
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