Skip to main content

read_smart_reference

Function read_smart_reference 

Source
pub fn read_smart_reference<'a>(
    data: &'a [u8],
    offset: &mut usize,
) -> Result<Option<Reference<'a>>>
Expand description

Resume a smart advertisement at a byte cursor. Start at zero; successful reads advance past one ref, including peeled tag pseudo-refs. EOF is stable. Validate the complete advertisement with SmartAdvertisement::parse first when exposing refs incrementally to callers.