Struct dusk_api::FreightDeclaration [−][src]
A structure, exported by plugin, containing some package details and register function
This structure contains the rust compiler version, the plugin was compiled with, api version it uses, the plugin name and version and the actual function, that is used to register the plugin.
The function is only needed to pass a structure, that implements
trait Freight to the FreightRegistrar::register_freight
as
structures can not be put into static variables, but static
functions can.
This structure must only be built by export_freight!
macro
in plugins. And its fields are only read by
FreightProxy::load
function when loading the plugin
Fields
rustc_version: &'static str
Rust compiler version as a static string
api_version: &'static str
Api version as a static string
freight_version: &'static str
Version of the freight being imported
name: &'static str
Name of the freight being imported
register: fn(_: &mut dyn FreightRegistrar)
Function that gets a FreightRegistrar
trait implementor
as an argument and calls its freight_register function
to provide unexportable things, such as structs, in
particular, Freight
implementor structures
Auto Trait Implementations
impl RefUnwindSafe for FreightDeclaration
[src]
impl Send for FreightDeclaration
[src]
impl Sync for FreightDeclaration
[src]
impl Unpin for FreightDeclaration
[src]
impl UnwindSafe for FreightDeclaration
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,