pub struct CandidateAttributes { /* private fields */ }Expand description
What:
The resolver of the text attribute for one prepared set of candidates.
It owns copies of the Git executable,
the global options and the child environment,
which already name the private index.
Why:
The policy asks lazily,
after the prepared candidates were handed over,
so the resolver cannot borrow the provider that prepared them.
In TS you’d write (pseudocode):
class CandidateAttributes { constructor(git, prefix, overlay, source) {} textUnset(paths: Buffer[]): Promise<Set<string>> {} }Implementations§
Source§impl CandidateAttributes
What:
impl CandidateAttributes { ... } attaches the constructor and the lookup.
Why:
One owner builds the Git commands,
so a policy cannot ask against another state than the candidates’.
impl CandidateAttributes
What:
impl CandidateAttributes { ... } attaches the constructor and the lookup.
Why:
One owner builds the Git commands,
so a policy cannot ask against another state than the candidates’.
In TS you’d write (pseudocode):
class CandidateAttributes { textUnset(paths) {} }Sourcepub fn new(
real_git: &Path,
global_prefix: &[OsString],
overlay: &[(OsString, OsString)],
source: AttributeSource,
) -> CandidateAttributes
pub fn new( real_git: &Path, global_prefix: &[OsString], overlay: &[(OsString, OsString)], source: AttributeSource, ) -> CandidateAttributes
What:
A resolver over source,
running the given Git with the given options and environment.
Why:
The environment is the one that names the candidates’ private index.
In TS you’d write (pseudocode):
constructor(realGit, globalPrefix, overlay, source) {}Sourcepub fn text_unset(
&self,
paths: &[&[u8]],
) -> Result<HashSet<Vec<u8>>, CandidateError>
pub fn text_unset( &self, paths: &[&[u8]], ) -> Result<HashSet<Vec<u8>>, CandidateError>
What:
The given candidate pathnames whose text attribute is unset.
No path means no Git process.
Why:
A policy asks only about the files it would otherwise change,
and a commit of canonical files starts no attribute query.
In TS you’d write (pseudocode):
async textUnset(paths: Buffer[]): Promise<Set<string>>; // throws CandidateErrorTrait Implementations§
Source§impl Clone for CandidateAttributes
impl Clone for CandidateAttributes
Auto Trait Implementations§
impl Freeze for CandidateAttributes
impl RefUnwindSafe for CandidateAttributes
impl Send for CandidateAttributes
impl Sync for CandidateAttributes
impl Unpin for CandidateAttributes
impl UnsafeUnpin for CandidateAttributes
impl UnwindSafe for CandidateAttributes
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
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> ⓘ
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> ⓘ
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