Struct Glob

pub struct Glob<'a>(/* private field */);

Glob represents a single glob in a set of file type definitions.

There may be more than one glob for a particular file type.

This is used to report information about the highest precedent glob that matched.

Note that not all matches necessarily correspond to a specific glob. For example, if there are one or more selections and a file path doesn't match any of those selections, then the file path is considered to be ignored.

The lifetime 'a refers to the lifetime of the underlying file type definition, which corresponds to the lifetime of the file type matcher.

Implementations

impl<'a> Glob<'a>

fn file_type_def(&self) -> Option<&FileTypeDef>

Return the file type definition that matched, if one exists. A file type definition always exists when a specific definition matches a file path.

Trait Implementations

impl<'a> Clone for Glob<'a>

fn clone(&self) -> Self

impl<'a> Debug for Glob<'a>

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Auto Trait Implementations

impl<'a> Freeze for Glob<'a>

impl<'a> RefUnwindSafe for Glob<'a>

impl<'a> Send for Glob<'a>

impl<'a> Sync for Glob<'a>

impl<'a> Unpin for Glob<'a>

impl<'a> UnsafeUnpin for Glob<'a>

impl<'a> UnwindSafe for Glob<'a>

Blanket Implementations

impl<T> Any for Glob<'a> where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for Glob<'a> where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for Glob<'a> where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> CloneToUninit for Glob<'a> where T: Clone,

unsafe fn clone_to_uninit(&self, dest: *mut u8)

impl<T> From<T> for Glob<'a>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Pointable for Glob<'a>

const ALIGN: usize = _;
type Init = T;
unsafe fn init(init: <T as Pointable>::Init) -> usize
unsafe fn deref<'a>(ptr: usize) -> &'a T
unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
unsafe fn drop(ptr: usize)

impl<T> ToOwned for Glob<'a> where T: Clone,

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

impl<T, U> Into<U> for Glob<'a> where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for Glob<'a> where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for Glob<'a> where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>