Enum dusk_api::InterplugRequest[][src]

pub enum InterplugRequest {
    Crucial {
        plugin: &'static str,
        version: &'static str,
    },
    Optional {
        plugin: &'static str,
        version: &'static str,
    },
    Either {
        requests: Vec<InterplugRequest>,
    },
    OptionalEither {
        requests: Vec<InterplugRequest>,
    },
    Each {
        requests: Vec<InterplugRequest>,
    },
    OptionalEach {
        requests: Vec<InterplugRequest>,
    },
}

Enum, that represents an interplugin request and either contains a InterplugRequest::Crucial plugin request (must be provided in order for the plugin to work or an InterplugRequest::Optional plugin request which may be denied

For more complex situations, when several plugins might provide similar functionality, InterplugRequest::Either may be used to provide several requests, each of which may be fulfilled for the plugin to work correctly. In case this functionality may also be provided by several different plugins together, InterplugRequest::Each should be used.

If the request is optional, the final decision to provide it or not to provide it is supposed to be made by the user. For example, if user needs some function from a plugin, that requires an optional interplug request to be fulfilled, they just add it to the dependencies, so the program, that provides the dependencies, when seeing this request finds out that the plugin that was requested was already loaded earlier, so it might as well provide it to the requesting plugin.

Variants

Crucial

An interplug request that MUST be fulfilled in order for the plugin to work at all

Fields of Crucial

plugin: &'static strversion: &'static str
Optional

An interplug request that must be fulfilled in order for the plugin to fully work, which means that without it some functions will be unavailable

Fields of Optional

plugin: &'static strversion: &'static str
Either

An interlplug request that contains several interlplug requests, either of which MUST be fulfilled for the plugin to work at all

Fields of Either

requests: Vec<InterplugRequest>
OptionalEither

An interlplug request that contains several interplug requests, either of which should be fulfilled for the plugin to fully work.

Fields of OptionalEither

requests: Vec<InterplugRequest>
Each

An interplug request that contains several interplug requests, each of which MUST be fulfilled in order for the plugin to work

Fields of Each

requests: Vec<InterplugRequest>
OptionalEach

An interplug request that contains several interplug requests, each of which should be fulfilled in for the plugin to fully work

Fields of OptionalEach

requests: Vec<InterplugRequest>

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.