Skip to content

miniproto_native::tl::tl_decode_bytes

  • Crate: miniproto_native
  • Rust visibility: restricted
  • Source: rust/miniproto/src/tl.rs
  • Python exposure: miniproto._native.tl_decode_bytes (confirmed from adjacent PyO3 attributes)
fn tl_decode_bytes(data: &[u8], offset: usize) -> _
  • data: TL bytes containing one length-prefixed byte field.
  • offset: Byte offset at which the field starts.
fn tl_decode_bytes(data: &[u8], offset: usize) -> PyResult<(Vec<u8>, usize)>

Defined in rust/miniproto/src/tl.rs:659-661

Decodes Python tl_decode_bytes(data, offset) and returns bytes plus the next aligned offset.

Returns ValueError for malformed or truncated TL data.

  • data: TL bytes containing one length-prefixed byte field.
  • offset: Byte offset at which the field starts.