spiffe::svid

Trait SvidRefSource

Source
pub trait SvidRefSource {
    type Item: Svid;

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

Represents a source of SPIFFE SVIDs.

Required Associated Types§

Source

type Item: Svid

The type of the SVIDs provided by the source.

Required Methods§

Source

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

Returns an SVID reference. If it cannot be found an SVID in the source, it returns Ok(None). If there’s is an error in source fetching the SVID, it returns an Err<Box<dyn Error + Send + Sync + 'static>>.

Implementors§