Struct ayaka_runtime::ContextBuilder
source · pub struct ContextBuilder<M: RawModule + Send + Sync + 'static> { /* private fields */ }Expand description
Builder of Context.
Implementations§
source§impl<M: RawModule + Send + Sync + 'static> ContextBuilder<M>
impl<M: RawModule + Send + Sync + 'static> ContextBuilder<M>
sourcepub fn new(frontend: FrontendType, linker: M::Linker) -> Self
pub fn new(frontend: FrontendType, linker: M::Linker) -> Self
Create a new ContextBuilder with frontend type and plugin runtime linker.
sourcepub fn with_paths(
self,
paths: &[impl AsRef<Path>]
) -> Result<ContextBuilderWithPaths<'_, M>>
pub fn with_paths( self, paths: &[impl AsRef<Path>] ) -> Result<ContextBuilderWithPaths<'_, M>>
Open a context with config paths.
If the input paths contains only one element, it may be a YAML or an FRFS file.
If the input paths contains many element, they should all be FRFS files,
and the latter one will override the former one.
sourcepub fn with_vfs(
self,
paths: &[VfsPath]
) -> Result<ContextBuilderWithPaths<'static, M>>
pub fn with_vfs( self, paths: &[VfsPath] ) -> Result<ContextBuilderWithPaths<'static, M>>
Open a context with config paths.
Auto Trait Implementations§
impl<M> RefUnwindSafe for ContextBuilder<M>
impl<M> Send for ContextBuilder<M>
impl<M> Sync for ContextBuilder<M>
impl<M> Unpin for ContextBuilder<M>
impl<M> UnwindSafe for ContextBuilder<M>
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