[−][src]Struct ucglib::build::FileBuilder
Builder handles building ucg code for a single file.
Fields
assert_collector: AssertCollector
is_module: bool
last: 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]
working_dir: P,
import_paths: &'a Vec<PathBuf>,
cache: Rc<RefCell<dyn Cache>>
) -> Self
Constructs a new Builder.
pub fn new_with_scope<P: Into<PathBuf>>(
working_dir: P,
import_paths: &'a Vec<PathBuf>,
cache: Rc<RefCell<dyn Cache>>,
scope: Scope
) -> Self
[src]
working_dir: P,
import_paths: &'a Vec<PathBuf>,
cache: Rc<RefCell<dyn Cache>>,
scope: Scope
) -> Self
Constructs a new Builder with a provided scope.
pub fn clone_builder(&self) -> Self
[src]
pub fn set_build_output(&mut self, scope: ValueMap)
[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]
&self,
def: &RangeDef,
scope: &Scope
) -> Result<Rc<Val>, Box<dyn Error>>
pub fn eval_is_check(
&self,
def: &BinaryOpDef,
scope: &Scope
) -> Result<Rc<Val>, Box<dyn Error>>
[src]
&self,
def: &BinaryOpDef,
scope: &Scope
) -> Result<Rc<Val>, Box<dyn Error>>
pub fn eval_expr(
&self,
expr: &Expression,
scope: &Scope
) -> Result<Rc<Val>, Box<dyn Error>>
[src]
&self,
expr: &Expression,
scope: &Scope
) -> Result<Rc<Val>, Box<dyn Error>>
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]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,