pub struct FixedSetProvider { /* private fields */ }Expand description
decleration provider with fixed set of decleration files.
§example
let provider = FixedSetProvider::new(vec![
parse_declaration_file(/* ... */, "file1", &ParseOptions::default(), &VoidProvider{}).unwrap(),
parse_declaration_file(/* ... */, "file2", &ParseOptions::default(), &VoidProvider{}).unwrap(),
]);
provider.get_by_name("file2"); // => Some(DeclFile { name: "file2" })
provider.get_by_name("doesnt exist"); // => NoneImplementations§
Trait Implementations§
Source§impl Debug for FixedSetProvider
impl Debug for FixedSetProvider
Auto Trait Implementations§
impl Freeze for FixedSetProvider
impl RefUnwindSafe for FixedSetProvider
impl Send for FixedSetProvider
impl Sync for FixedSetProvider
impl Unpin for FixedSetProvider
impl UnwindSafe for FixedSetProvider
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