Skip to navigation

Generated from cargo doc --no-deps -p nemo-relay-builtins -p nemo-relay-diagnostics -p nemo-relay-logging -p nemo-relay-plugin-host -p nemo-relay-codecs -p nemo-relay -p nemo-relay-runtime -p nemo-relay-model-pricing -p nemo-relay-resource-metrics -p nemo-relay-observability -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 PluginRegistration {
pub kind: String,
pub name: String,
/* private fields */
}

Referenced types: String

Bookkeeping for one middleware/subscriber registration.

Fields

kind: String

Registration kind used for bookkeeping.

name: String

Runtime-qualified registration name.

Implementations

impl PluginRegistration

impl PluginRegistration

Referenced types: PluginRegistration

new

pub fn new(
kind: impl Into<String>,
name: impl Into<String>,
deregister: Box<dyn FnMut() -> Result<(), PluginError> + Send>,
) -> PluginRegistration

Referenced types: Into, String, Box, FnMut, Result, (), PluginError, Send, PluginRegistration

Creates a new registration bookkeeping entry.

new_with_outcome

pub fn new_with_outcome(
kind: impl Into<String>,
name: impl Into<String>,
deregister: Box<dyn FnMut() -> PluginRegistrationCleanupOutcome + Send>,
) -> PluginRegistration

Referenced types: Into, String, Box, FnMut, PluginRegistrationCleanupOutcome, Send, PluginRegistration

Construct a cleanup entry that reports whether the resource was removed.

impl PluginRegistration

impl PluginRegistration

Referenced types: PluginRegistration

cleanup

pub fn cleanup(&mut self) -> PluginRegistrationCleanupOutcome

Referenced types: PluginRegistrationCleanupOutcome

Execute this registration’s tracked cleanup operation.

Trait Implementations

impl Debug for PluginRegistration

impl Debug for PluginRegistration

Referenced types: Debug, PluginRegistration

fmt

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

Referenced types: fmt, Formatter, Result, (), Error