pub struct MatchLocation {
pub source: String,
pub file_path: Option<String>,
pub line: Option<usize>,
pub offset: usize,
pub commit: Option<String>,
pub author: Option<String>,
pub date: Option<String>,
}Expand description
Where a credential was found: file path, line number, commit, and author.
§Examples
use keyhog_core::MatchLocation;
let location = MatchLocation {
source: "stdin".into(),
file_path: None,
line: Some(3),
offset: 20,
commit: None,
author: None,
date: None,
};
assert_eq!(location.line, Some(3));Fields§
§source: StringLogical source backend, such as filesystem or git.
file_path: Option<String>File path, object key, or logical path when available.
line: Option<usize>One-based line number when known.
offset: usizeByte offset from the start of the source chunk.
commit: Option<String>Commit identifier for history-derived matches.
Commit author when available.
date: Option<String>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 · 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
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