Skip to main content

LabelResolver

Trait LabelResolver 

Source
pub trait LabelResolver: Send + Sync {
    // Required methods
    fn resolve_label_info(&self, label: &str) -> Result<Option<LabelKeyInfo>>;
    fn available_labels(&self) -> Vec<String>;
    fn can_resolve(&self, label: &str) -> bool;
    fn clone_box(&self) -> Box<dyn LabelResolver>;
}
Expand description

Label resolver interface for mapping labels to public keys

Required Methods§

Source

fn resolve_label_info(&self, label: &str) -> Result<Option<LabelKeyInfo>>

Resolve a label to key-info (public key + scope).

Source

fn available_labels(&self) -> Vec<String>

Get available labels in current context

Source

fn can_resolve(&self, label: &str) -> bool

Check if a label can be resolved

Source

fn clone_box(&self) -> Box<dyn LabelResolver>

Clone this trait object

Trait Implementations§

Source§

impl LabelResolver for Box<dyn LabelResolver>

Source§

fn resolve_label_info(&self, label: &str) -> Result<Option<LabelKeyInfo>>

Resolve a label to key-info (public key + scope).
Source§

fn available_labels(&self) -> Vec<String>

Get available labels in current context
Source§

fn can_resolve(&self, label: &str) -> bool

Check if a label can be resolved
Source§

fn clone_box(&self) -> Box<dyn LabelResolver>

Clone this trait object

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl LabelResolver for Box<dyn LabelResolver>

Implementors§