pub struct Plugin {
pub type: String,
pub id: String,
pub requires: Vec<String>,
pub platforms: Vec<Platform>,
pub exports: HashMap<String, String>,
pub capabilities: Vec<String>,
pub init_err: Option<Status>,
}
Fields§
§type: String
Type defines the type of plugin.
See package plugin for a list of possible values. Non core plugins may define their own values during registration.
id: String
ID identifies the plugin uniquely in the system.
requires: Vec<String>
Requires lists the plugin types required by this plugin.
platforms: Vec<Platform>
Platforms enumerates the platforms this plugin will support.
If values are provided here, the plugin will only be operable under the provided platforms.
If this is empty, the plugin will work across all platforms.
If the plugin prefers certain platforms over others, they should be listed from most to least preferred.
exports: HashMap<String, String>
Exports allows plugins to provide values about state or configuration to interested parties.
One example is exposing the configured path of a snapshotter plugin.
capabilities: Vec<String>
Capabilities allows plugins to communicate feature switches to allow clients to detect features that may not be on be default or may be different from version to version.
Use this sparingly.
init_err: Option<Status>
InitErr will be set if the plugin fails initialization.
This means the plugin may have been registered but a non-terminal error was encountered during initialization.
Plugins that have this value set cannot be used.
Trait Implementations§
source§impl Message for Plugin
impl Message for Plugin
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl Name for Plugin
impl Name for Plugin
source§const NAME: &'static str = "Plugin"
const NAME: &'static str = "Plugin"
Message
.
This name is the same as it appears in the source .proto file, e.g. FooBar
.source§const PACKAGE: &'static str = "containerd.services.introspection.v1"
const PACKAGE: &'static str = "containerd.services.introspection.v1"
.
, e.g. google.protobuf
.source§fn full_name() -> String
fn full_name() -> String
Message
.
It’s prefixed with the package name and names of any parent messages,
e.g. google.rpc.BadRequest.FieldViolation
.
By default, this is the package name followed by the message name.
Fully-qualified names must be unique within a domain of Type URLs.impl StructuralPartialEq for Plugin
Auto Trait Implementations§
impl Freeze for Plugin
impl RefUnwindSafe for Plugin
impl Send for Plugin
impl Sync for Plugin
impl Unpin for Plugin
impl UnwindSafe for Plugin
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request