pub struct CaptureRepository {
pub root: PathBuf,
pub captures: Vec<CaptureInfo>,
}Expand description
Repository for discovering and loading capture specifications
Fields§
§root: PathBuf§captures: Vec<CaptureInfo>Implementations§
Source§impl CaptureRepository
impl CaptureRepository
Sourcepub fn new(root: &Path) -> Result<Self, CaptureDiscoveryError>
pub fn new(root: &Path) -> Result<Self, CaptureDiscoveryError>
Create a new repository by scanning the captures directory
Sourcepub fn list_all(&self) -> &[CaptureInfo]
pub fn list_all(&self) -> &[CaptureInfo]
List all discovered captures
Sourcepub fn get_by_name(&self, name: &str) -> Result<LoadedCapture, CaptureRepoError>
pub fn get_by_name(&self, name: &str) -> Result<LoadedCapture, CaptureRepoError>
Load a capture by its logical name
Auto Trait Implementations§
impl Freeze for CaptureRepository
impl RefUnwindSafe for CaptureRepository
impl Send for CaptureRepository
impl Sync for CaptureRepository
impl Unpin for CaptureRepository
impl UnsafeUnpin for CaptureRepository
impl UnwindSafe for CaptureRepository
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more