Struct EmptyFreight

Source
pub struct EmptyFreight;
Expand description

Structure representing an empty Freight implementor, needed only for FreightProxy configuration

Trait Implementations§

Source§

impl Freight for EmptyFreight

Source§

fn call_function( &mut self, _function_number: u64, _args: Vec<&mut Box<dyn Any>>, ) -> Result<Box<dyn Any>, RuntimeError>

Function that is used to call proxy the calls from the outside of a plugin to the internal functions and must implement function calling, by its number arguments, contained inside of Vec<Box<dyn Any>> and must return either a Box<dyn Any> representing the returned value or a RuntimeError
Source§

fn get_function_list(&mut self) -> Vec<Function>

Function that is used to provide information about internal functions of a plugin to the program using it, so it can choose the function it needs either by its name, argument types, return type or all of the above
Source§

fn init( &mut self, _limitations: &Option<Vec<Limitation>>, ) -> Vec<InterplugRequest>

Function that is ran when importing the plugin, which may be reimplememented in a plugin if it needs to set up some things before doing any other actions Read more
Source§

fn update_limitations(&mut self, _limitations: &Vec<Limitation>)

Function that updates system limitations
Source§

fn interplug_provide( &mut self, _request: InterplugRequest, _freight_proxy: Rc<FreightProxy>, )

Function that replies to the interplugin request by providing the requested plugin
Source§

fn interplug_deny(&mut self, _request: InterplugRequest)

Function that replies to the interplugin request by by informing it that the request was denied
Source§

fn get_type_list(&mut self) -> Vec<Type>

Function that is used to provide information about non standard types, a function from this plugin might take as an argument or return, so that the program using the plugin can take such non-standard objects from one function implemented in this plugin and pass it on into another function in this plugin Read more
Source§

fn get_operator_list(&mut self) -> Vec<Function>

Function that is used to provide information about internal functions of a plugin that are named after binary operators and should be treated as such. These functions have to always get exactly two arguments and they are called by the same function that calls any function Freight::call_function

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.