[][src]Struct ucglib::build::FileBuilder

pub struct FileBuilder<'a> {
    pub assert_collector: AssertCollector,
    pub is_module: bool,
    pub last: Option<Rc<Val>>,
    pub out_lock: Option<(String, Rc<Val>)>,
    // some fields omitted
}

Builder handles building ucg code for a single file.

Fields

assert_collector: AssertCollectoris_module: boollast: Option<Rc<Val>>out_lock: Option<(String, Rc<Val>)>

Methods

impl<'a> FileBuilder<'a>[src]

pub fn new<P: Into<PathBuf>>(
    working_dir: P,
    import_paths: &'a Vec<PathBuf>,
    cache: Rc<RefCell<dyn Cache>>
) -> Self
[src]

Constructs a new Builder.

pub fn clone_builder(&self) -> Self[src]

pub fn build<P: Into<PathBuf>>(&mut self, file: P) -> Result<(), Box<dyn Error>>[src]

Builds a ucg file at the named path.

pub fn merge_build_output(&mut self, scope: ValueMap, clobber: bool)[src]

pub fn set_strict(&mut self, to: bool)[src]

pub fn get_out_by_name(&self, name: &str) -> Option<Rc<Val>>[src]

Returns a Val by name from previously built UCG.

pub fn enable_validate_mode(&mut self)[src]

Puts the builder in validation mode.

Among other things this means that assertions will be evaluated and their results will be saved in a report for later output.

pub fn eval_stmts(&mut self, ast: &Vec<Statement>) -> Result<(), Box<dyn Error>>[src]

Builds a list of parsed UCG Statements.

pub fn eval_string(&mut self, input: &str) -> Result<Rc<Val>, Box<dyn Error>>[src]

Evaluate an input string as UCG.

pub fn eval_include(&self, def: &IncludeDef) -> Result<Rc<Val>, Box<dyn Error>>[src]

pub fn eval_range(
    &self,
    def: &RangeDef,
    scope: &Scope
) -> Result<Rc<Val>, Box<dyn Error>>
[src]

pub fn eval_is_check(
    &self,
    def: &BinaryOpDef,
    scope: &Scope
) -> Result<Rc<Val>, Box<dyn Error>>
[src]

pub fn eval_expr(
    &self,
    expr: &Expression,
    scope: &Scope
) -> Result<Rc<Val>, Box<dyn Error>>
[src]

Auto Trait Implementations

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

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

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.