pub struct FixedSetProviderRef<'a> { /* private fields */ }
Expand description
decleration provider with fixed set of decleration files.
a decleration provider for cases where only a fixed set of decleration files are available.
this provider is same as FixedSetProvider
, but it take references to the declaration files, not owning them. so it can redirect declarations from other provider.
§example
let provider = FixedSetProviderRef::new(&[
some_provider.get_by_name("file1").unwrap(),
other_provider.get_by_name("file2").unwrap(),
]);
provider.get_by_name("file2"); // => Some(DeclFile { name: "file2" })
provider.get_by_name("doesnt exist"); // => None
Implementations§
Trait Implementations§
Source§impl<'a> Clone for FixedSetProviderRef<'a>
impl<'a> Clone for FixedSetProviderRef<'a>
Source§fn clone(&self) -> FixedSetProviderRef<'a>
fn clone(&self) -> FixedSetProviderRef<'a>
Returns a duplicate 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 moreSource§impl<'a> Debug for FixedSetProviderRef<'a>
impl<'a> Debug for FixedSetProviderRef<'a>
Auto Trait Implementations§
impl<'a> Freeze for FixedSetProviderRef<'a>
impl<'a> RefUnwindSafe for FixedSetProviderRef<'a>
impl<'a> Send for FixedSetProviderRef<'a>
impl<'a> Sync for FixedSetProviderRef<'a>
impl<'a> Unpin for FixedSetProviderRef<'a>
impl<'a> UnwindSafe for FixedSetProviderRef<'a>
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