Struct darklua_core::rules::ContextBuilder
source · pub struct ContextBuilder<'a, 'resources, 'code> { /* private fields */ }
Implementations§
source§impl<'a, 'resources, 'code> ContextBuilder<'a, 'resources, 'code>
impl<'a, 'resources, 'code> ContextBuilder<'a, 'resources, 'code>
pub fn new( path: impl Into<PathBuf>, resources: &'resources Resources, original_code: &'code str ) -> Self
pub fn with_project_location(self, path: impl Into<PathBuf>) -> Self
pub fn build(self) -> Context<'a, 'resources, 'code>
pub fn insert_block<'block: 'a>( &mut self, path: impl Into<PathBuf>, block: &'block Block )
Trait Implementations§
source§impl<'a, 'resources, 'code> Clone for ContextBuilder<'a, 'resources, 'code>
impl<'a, 'resources, 'code> Clone for ContextBuilder<'a, 'resources, 'code>
source§fn clone(&self) -> ContextBuilder<'a, 'resources, 'code>
fn clone(&self) -> ContextBuilder<'a, 'resources, 'code>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<'a, 'resources, 'code> RefUnwindSafe for ContextBuilder<'a, 'resources, 'code>
impl<'a, 'resources, 'code> Send for ContextBuilder<'a, 'resources, 'code>
impl<'a, 'resources, 'code> Sync for ContextBuilder<'a, 'resources, 'code>
impl<'a, 'resources, 'code> Unpin for ContextBuilder<'a, 'resources, 'code>
impl<'a, 'resources, 'code> UnwindSafe for ContextBuilder<'a, 'resources, 'code>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<I, T> ExtractContext<I, ()> for T
impl<I, T> ExtractContext<I, ()> for T
§fn extract_context(self, _original_input: I)
fn extract_context(self, _original_input: I)
Given the context attached to a nom error, and given the original
input to the nom parser, extract more the useful context information. Read more
§impl<I> RecreateContext<I> for I
impl<I> RecreateContext<I> for I
§fn recreate_context(_original_input: I, tail: I) -> I
fn recreate_context(_original_input: I, tail: I) -> I
Given the original input, as well as the context reported by nom,
recreate a context in the original string where the error occurred. Read more