Skip to main content

write_optional_bytes_with_flag

Function write_optional_bytes_with_flag 

Source
pub fn write_optional_bytes_with_flag(
    writer: &mut impl Write,
    data: Option<&[u8]>,
) -> Result<(), WalletError>
Expand description

Write optional bytes with a presence flag byte. If data is Some and non-empty: write 1 then len-prefixed bytes. If data is None or empty: write 0.