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>,
},
}
Expand description
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
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
Either
An interlplug request that contains several interlplug requests, either of which MUST be fulfilled for the plugin to work at all
Fields
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
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
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
requests: Vec<InterplugRequest>