spiffe::bundle

Trait BundleRefSource

Source
pub trait BundleRefSource {
    type Item: Bundle;

    // Required method
    fn get_bundle_for_trust_domain(
        &self,
        trust_domain: &TrustDomain,
    ) -> Result<Option<&Self::Item>, Box<dyn Error + Send + Sync + 'static>>;
}
Expand description

Represents a source of bundles queryable by TrustDomain.

Required Associated Types§

Source

type Item: Bundle

The type of the bundles provided by the source.

Required Methods§

Source

fn get_bundle_for_trust_domain( &self, trust_domain: &TrustDomain, ) -> Result<Option<&Self::Item>, Box<dyn Error + Send + Sync + 'static>>

Returns the reference to bundle (set of public keys authorities) associated to the TrustDomain. If it cannot be found a bundle associated to the trust domain, it returns Ok(None). If there’s is an error in source fetching the bundle, it returns an Err<Box<dyn Error + Send + Sync + 'static>>.

Implementors§