pub struct CopyRecords { /* private fields */ }Expand description
A collection of CopyRecords.
Implementations§
Source§impl CopyRecords
impl CopyRecords
Sourcepub fn add_records(
&mut self,
copy_records: impl IntoIterator<Item = BackendResult<CopyRecord>>,
) -> BackendResult<()>
pub fn add_records( &mut self, copy_records: impl IntoIterator<Item = BackendResult<CopyRecord>>, ) -> BackendResult<()>
Adds information about CopyRecords to self. A target with multiple
conflicts is discarded and treated as not having an origin.
Sourcepub fn has_source(&self, source: &RepoPath) -> bool
pub fn has_source(&self, source: &RepoPath) -> bool
Returns true if there are copy records associated with a source path.
Sourcepub fn for_source(&self, source: &RepoPath) -> Option<&CopyRecord>
pub fn for_source(&self, source: &RepoPath) -> Option<&CopyRecord>
Gets any copy record associated with a source path.
Sourcepub fn has_target(&self, target: &RepoPath) -> bool
pub fn has_target(&self, target: &RepoPath) -> bool
Returns true if there are copy records associated with a target path.
Sourcepub fn for_target(&self, target: &RepoPath) -> Option<&CopyRecord>
pub fn for_target(&self, target: &RepoPath) -> Option<&CopyRecord>
Gets any copy record associated with a target path.
Sourcepub fn iter(&self) -> impl Iterator<Item = &CopyRecord> + '_
pub fn iter(&self) -> impl Iterator<Item = &CopyRecord> + '_
Gets all copy records.
Trait Implementations§
Source§impl Debug for CopyRecords
impl Debug for CopyRecords
Source§impl Default for CopyRecords
impl Default for CopyRecords
Source§fn default() -> CopyRecords
fn default() -> CopyRecords
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CopyRecords
impl RefUnwindSafe for CopyRecords
impl Send for CopyRecords
impl Sync for CopyRecords
impl Unpin for CopyRecords
impl UnwindSafe for CopyRecords
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