Skip to main content

parse

Function parse 

Source
pub fn parse(
    packet: &[u8],
    width: SignatureWidth,
) -> Result<UnverifiedWakeUp<'_>, ParseError>
Expand description

Inspect a complete version-one message with fixed space and bounded work.

use smgw_core::wakeup::{parse, ParseError, SignatureWidth};
assert_eq!(parse(&[], SignatureWidth::Bits256), Err(ParseError::Length));