Skip to main content

ScriptPackage

Struct ScriptPackage 

Source
pub struct ScriptPackage<'a, SE: ScriptExpression> {
    pub modules: Vec<ScriptModule<'a, SE>>,
}
Expand description

A whole compilation unit: the modules a frontend produced.

Fields§

§modules: Vec<ScriptModule<'a, SE>>

Modules this unit is made of.

Implementations§

Source§

impl<SE: ScriptExpression> ScriptPackage<'static, SE>

Source

pub fn install<SFG: ScriptFunctionGenerator<SE>>( &self, registry: &mut Registry, input: SFG::Input, )
where SFG::Input: Clone,

Installs everything into a registry.

Every module’s types go in first, across the whole package, so functions and fields can refer to types from any module.

Trait Implementations§

Source§

impl<'a, SE: Debug + ScriptExpression> Debug for ScriptPackage<'a, SE>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a, SE: Default + ScriptExpression> Default for ScriptPackage<'a, SE>

Source§

fn default() -> ScriptPackage<'a, SE>

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<'a, SE> Freeze for ScriptPackage<'a, SE>
where Vec<ScriptModule<'a, SE>>: Freeze,

§

impl<'a, SE> RefUnwindSafe for ScriptPackage<'a, SE>
where Vec<ScriptModule<'a, SE>>: RefUnwindSafe,

§

impl<'a, SE> Send for ScriptPackage<'a, SE>
where Vec<ScriptModule<'a, SE>>: Send,

§

impl<'a, SE> Sync for ScriptPackage<'a, SE>
where Vec<ScriptModule<'a, SE>>: Sync,

§

impl<'a, SE> Unpin for ScriptPackage<'a, SE>
where Vec<ScriptModule<'a, SE>>: Unpin,

§

impl<'a, SE> UnsafeUnpin for ScriptPackage<'a, SE>
where Vec<ScriptModule<'a, SE>>: UnsafeUnpin,

§

impl<'a, SE> UnwindSafe for ScriptPackage<'a, SE>
where Vec<ScriptModule<'a, SE>>: UnwindSafe,

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> Finalize for T

Source§

unsafe fn finalize_raw(data: *mut ())

Drops the value stored at data in place. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Initialize for T
where T: Default,

Source§

fn initialize() -> T

Returns the initial value of this type.
Source§

unsafe fn initialize_raw(data: *mut ())

Writes the initial value into already allocated memory. Read more
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 = !

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.