pub struct MatchLocation {
pub source: Arc<str>,
pub file_path: Option<Arc<str>>,
pub line: Option<usize>,
pub offset: usize,
pub commit: Option<Arc<str>>,
pub author: Option<Arc<str>>,
pub date: Option<Arc<str>>,
}Expand description
Where a credential was found: file path, line number, commit, and author.
Fields§
§source: Arc<str>Logical source backend, such as filesystem or git.
file_path: Option<Arc<str>>File path, object key, or logical path when available.
Paths stored here must be valid UTF-8. Source implementations that see
non-UTF-8 paths should encode them into a reversible escaped string
before constructing a MatchLocation.
line: Option<usize>One-based line number when known.
offset: usizeByte offset from the start of the source chunk.
commit: Option<Arc<str>>Commit identifier for history-derived matches.
Commit author when available.
date: Option<Arc<str>>Commit timestamp when available.
Trait Implementations§
Source§impl Clone for MatchLocation
impl Clone for MatchLocation
Source§fn clone(&self) -> MatchLocation
fn clone(&self) -> MatchLocation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MatchLocation
impl Debug for MatchLocation
Source§impl<'de> Deserialize<'de> for MatchLocation
impl<'de> Deserialize<'de> for MatchLocation
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for MatchLocation
impl PartialEq for MatchLocation
Source§fn eq(&self, other: &MatchLocation) -> bool
fn eq(&self, other: &MatchLocation) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for MatchLocation
impl Serialize for MatchLocation
impl StructuralPartialEq for MatchLocation
Auto Trait Implementations§
impl Freeze for MatchLocation
impl RefUnwindSafe for MatchLocation
impl Send for MatchLocation
impl Sync for MatchLocation
impl Unpin for MatchLocation
impl UnsafeUnpin for MatchLocation
impl UnwindSafe for MatchLocation
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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