Trait Init

Source
pub trait Init: Sized {
    // Required method
    fn init(self, scope: &mut Scope) -> Self;
}
Expand description

Trait to be implemented by cube types implementations.

Required Methods§

Source

fn init(self, scope: &mut Scope) -> Self

Initialize a type within a scope.

You can return the same value when the variable is a non-mutable data structure or if the type can not be deeply cloned/copied.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Init for ExpandElement

Source§

fn init(self, scope: &mut Scope) -> Self

Source§

impl Init for u8

Source§

fn init(self, _scope: &mut Scope) -> Self

Source§

impl Init for u16

Source§

fn init(self, _scope: &mut Scope) -> Self

Source§

impl Init for u32

Source§

fn init(self, _scope: &mut Scope) -> Self

Source§

impl Init for u64

Source§

fn init(self, _scope: &mut Scope) -> Self

Source§

impl Init for ()

Source§

fn init(self, scope: &mut Scope) -> Self

Source§

impl<P0: Init> Init for (P0,)

Source§

fn init(self, scope: &mut Scope) -> Self

Source§

impl<P0: Init, P1: Init> Init for (P0, P1)

Source§

fn init(self, scope: &mut Scope) -> Self

Source§

impl<P0: Init, P1: Init, P2: Init> Init for (P0, P1, P2)

Source§

fn init(self, scope: &mut Scope) -> Self

Source§

impl<P0: Init, P1: Init, P2: Init, P3: Init> Init for (P0, P1, P2, P3)

Source§

fn init(self, scope: &mut Scope) -> Self

Source§

impl<P0: Init, P1: Init, P2: Init, P3: Init, P4: Init> Init for (P0, P1, P2, P3, P4)

Source§

fn init(self, scope: &mut Scope) -> Self

Source§

impl<P0: Init, P1: Init, P2: Init, P3: Init, P4: Init, P5: Init> Init for (P0, P1, P2, P3, P4, P5)

Source§

fn init(self, scope: &mut Scope) -> Self

Source§

impl<P0: Init, P1: Init, P2: Init, P3: Init, P4: Init, P5: Init, P6: Init> Init for (P0, P1, P2, P3, P4, P5, P6)

Source§

fn init(self, scope: &mut Scope) -> Self

Source§

impl<P0: Init, P1: Init, P2: Init, P3: Init, P4: Init, P5: Init, P6: Init, P7: Init> Init for (P0, P1, P2, P3, P4, P5, P6, P7)

Source§

fn init(self, scope: &mut Scope) -> Self

Source§

impl<P0: Init, P1: Init, P2: Init, P3: Init, P4: Init, P5: Init, P6: Init, P7: Init, P8: Init> Init for (P0, P1, P2, P3, P4, P5, P6, P7, P8)

Source§

fn init(self, scope: &mut Scope) -> Self

Source§

impl<P0: Init, P1: Init, P2: Init, P3: Init, P4: Init, P5: Init, P6: Init, P7: Init, P8: Init, P9: Init> Init for (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9)

Source§

fn init(self, scope: &mut Scope) -> Self

Source§

impl<P0: Init, P1: Init, P2: Init, P3: Init, P4: Init, P5: Init, P6: Init, P7: Init, P8: Init, P9: Init, P10: Init> Init for (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10)

Source§

fn init(self, scope: &mut Scope) -> Self

Source§

impl<P0: Init, P1: Init, P2: Init, P3: Init, P4: Init, P5: Init, P6: Init, P7: Init, P8: Init, P9: Init, P10: Init, P11: Init> Init for (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11)

Source§

fn init(self, scope: &mut Scope) -> Self

Source§

impl<T: Init> Init for Option<T>

Source§

fn init(self, scope: &mut Scope) -> Self

Source§

impl<T: Init> Init for Vec<T>

Source§

fn init(self, scope: &mut Scope) -> Self

Implementors§