Skip to navigation

Struct Projection Guard

View as Markdown

Generated from cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-pii-redaction -p nemo-relay-ffi -p nemo-relay-types -p nemo-relay-plugin -p nemo-relay-worker-proto -p nemo-relay-worker.

pub struct ProjectionGuard { /* private fields */ }

Bounded projection subscription, or inert disabled-mode handle.

Dropping unsubscribes future publication. A callback copied before removal may still finish; adapters can add stronger shutdown ordering when needed.

Retain the guard for the subscription’s intended lifetime:

#![deny(unused_must_use)]
use nemo_relay::diagnostics::{DiagnosticError, Diagnostics};
fn subscribe(diagnostics: &Diagnostics) -> Result<(), DiagnosticError> {
diagnostics.subscribe_projection(|_| {})?; // Immediately unsubscribes.
Ok(())
}

Trait Implementations

impl Debug for ProjectionGuard

impl Debug for ProjectionGuard

fmt

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Drop for ProjectionGuard

impl Drop for ProjectionGuard

drop

fn drop(&mut self)