Skip to main content

decode

Function decode 

Source
pub fn decode(bytes: &[u8]) -> Result<WalEvent, DecodeError>
Expand description

Decodes a WAL event from bytes.

§Format

See the module documentation for the expected byte format.

§Errors

Returns an error if:

  • The version frame doesn’t match the expected version
  • The length frame exceeds reasonable bounds
  • The CRC-32 checksum doesn’t match
  • The payload cannot be deserialized to WalEvent