[−][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, C> FileBuilder<'a, C> where
C: Cache,
[src]
C: Cache,
pub fn new<P: Into<PathBuf>>(
working_dir: P,
import_paths: &'a Vec<PathBuf>,
cache: Rc<RefCell<C>>,
converter_registry: &'a ConverterRegistry
) -> Self
[src]
working_dir: P,
import_paths: &'a Vec<PathBuf>,
cache: Rc<RefCell<C>>,
converter_registry: &'a ConverterRegistry
) -> Self
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 scope_mut(&mut self) -> &mut Scope
[src]
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_input(
&mut self,
input: OffsetStrIter
) -> Result<Rc<Val>, Box<dyn Error>>
[src]
&mut self,
input: OffsetStrIter
) -> Result<Rc<Val>, Box<dyn Error>>
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, C> !Sync for FileBuilder<'a, C>
impl<'a, C> Unpin for FileBuilder<'a, C>
impl<'a, C> !Send for FileBuilder<'a, C>
impl<'a, C> !UnwindSafe for FileBuilder<'a, C>
impl<'a, C> !RefUnwindSafe for FileBuilder<'a, C>
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> 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, U> TryInto<U> 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> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,