Skip to main content

Emission

Struct Emission 

Source
pub struct Emission<'a> {
    pub eng: Rc<Engine>,
    pub menv: Rc<Env>,
    pub root_name: String,
    pub value: Value,
    pub form: Form,
    pub yaml: Option<bool>,
    pub indent: Option<usize>,
    pub template: Option<(String, String, String)>,
    pub read_template: &'a dyn Fn(&str) -> Option<String>,
}
Expand description

what emits one root: its value, its form with the invocation’s overrides, and the template’s text when there is one

Fields§

§eng: Rc<Engine>

the engine of the run

§menv: Rc<Env>

the entry module’s environment

§root_name: String

the root’s name

§value: Value

the root’s value

§form: Form

the declared form

§yaml: Option<bool>

--format yaml / --format json

§indent: Option<usize>

--indent n

§template: Option<(String, String, String)>

the template’s path as given, its text, and the absolute directory its includes resolve from

§read_template: &'a dyn Fn(&str) -> Option<String>

the text of a template file by absolute path

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for Emission<'a>

§

impl<'a> !Send for Emission<'a>

§

impl<'a> !Sync for Emission<'a>

§

impl<'a> !UnwindSafe for Emission<'a>

§

impl<'a> Forget for Emission<'a>

§

impl<'a> Freeze for Emission<'a>

§

impl<'a> Move for Emission<'a>

§

impl<'a> Unpin for Emission<'a>

§

impl<'a> UnsafeUnpin for Emission<'a>

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

Source§

type Output = T

Should always be Self
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, !>

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.