pub struct DecodingPipeline { /* private fields */ }Expand description
Main decoding pipeline.
Implementations§
Source§impl DecodingPipeline
impl DecodingPipeline
Sourcepub fn new(config: DecodingConfig) -> Self
pub fn new(config: DecodingConfig) -> Self
Creates a new decoding pipeline.
Sourcepub const fn skipped_verifications(&self) -> u64
pub const fn skipped_verifications(&self) -> u64
br-asupersync-f4mdcr: total number of feed() calls that
accepted a symbol with authentication INTENTIONALLY skipped
because config.verify_auth = false. Operators can scrape
this counter via the runtime’s observability surface to alert
on misconfigured pipelines that quietly disable auth in
production. Pre-fix the skip was silent — no log, no counter,
no observability hook fired — so a deployment that misset
verify_auth = false accepted unauthenticated symbols
without any operator-visible signal.
Sourcepub fn with_auth(config: DecodingConfig, ctx: SecurityContext) -> Self
pub fn with_auth(config: DecodingConfig, ctx: SecurityContext) -> Self
Creates a new decoding pipeline with authentication enabled.
Sourcepub fn set_object_params(
&mut self,
params: ObjectParams,
) -> Result<(), DecodingError>
pub fn set_object_params( &mut self, params: ObjectParams, ) -> Result<(), DecodingError>
Sets object parameters (object size, symbol size, and block layout).
Sourcepub fn block_accept_cap(&self) -> usize
pub fn block_accept_cap(&self) -> usize
The effective per-block symbol-accept cap (0 means unbounded).
With max_buffered_symbols == 0, set_object_params
sizes this to cover K (plus repair slack) via configure_auto_buffer_limit;
with a fixed nonzero max_buffered_symbols it stays at that value and does
not scale with K.
Sourcepub fn feed(
&mut self,
auth_symbol: AuthenticatedSymbol,
) -> Result<SymbolAcceptResult, DecodingError>
pub fn feed( &mut self, auth_symbol: AuthenticatedSymbol, ) -> Result<SymbolAcceptResult, DecodingError>
Feeds a received authenticated symbol into the pipeline.
Sourcepub fn feed_batch(
&mut self,
symbols: impl Iterator<Item = AuthenticatedSymbol>,
) -> Vec<Result<SymbolAcceptResult, DecodingError>>
pub fn feed_batch( &mut self, symbols: impl Iterator<Item = AuthenticatedSymbol>, ) -> Vec<Result<SymbolAcceptResult, DecodingError>>
Feeds a batch of symbols.
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Returns true if all expected blocks are decoded.
Sourcepub fn progress(&self) -> DecodingProgress
pub fn progress(&self) -> DecodingProgress
Returns decoding progress.
Sourcepub fn block_status(&self, sbn: u8) -> Option<BlockStatus>
pub fn block_status(&self, sbn: u8) -> Option<BlockStatus>
Returns per-block status if known.
Sourcepub fn into_data(self) -> Result<Vec<u8>, DecodingError>
pub fn into_data(self) -> Result<Vec<u8>, DecodingError>
Consumes the pipeline and returns decoded data if complete.
Sourcepub fn missing_source_symbols(&self, limit: usize) -> Vec<MissingSourceSymbol>
pub fn missing_source_symbols(&self, limit: usize) -> Vec<MissingSourceSymbol>
Returns missing systematic source symbols for incomplete blocks.
This is used by ATP-RQ as a cheap first feedback step: retransmitting a
sparse set of missing systematic symbols avoids constructing the
CPU-heavy RaptorQ repair encoder when the receiver only dropped a few
datagrams. limit == 0 means unbounded.