[−][src]Struct radicle_surf::vcs::History
A non-empty bag of artifacts which are used to
derive a Directory
view. Examples of artifacts
would be commits in Git or patches in Pijul.
Methods
impl<A> History<A>
[src]
pub fn new(a: A) -> Self
[src]
pub fn push(&mut self, a: A)
[src]
pub fn iter<'a>(&'a self) -> impl Iterator<Item = &A> + 'a
[src]
Iterator over the artifacts.
pub fn first(&self) -> &A
[src]
pub fn find_suffix(&self, artifact: &A) -> Option<Self> where
A: Clone + PartialEq,
[src]
A: Clone + PartialEq,
Given that the History
is topological order from most
recent artifact to least recent, find_suffix
gets returns
the history up until the point of the given artifact.
This operation may fail if the artifact does not exist in
the given History
.
pub fn map<F, B>(&self, f: F) -> History<B> where
F: Fn(&A) -> B,
[src]
F: Fn(&A) -> B,
pub fn find<F, B>(&self, f: F) -> Option<B> where
F: Fn(&A) -> Option<B>,
[src]
F: Fn(&A) -> Option<B>,
pub fn find_in_history<Identifier, F>(
&self,
identifier: &Identifier,
id_of: F
) -> Option<A> where
A: Clone,
F: Fn(&A) -> Identifier,
Identifier: PartialEq,
[src]
&self,
identifier: &Identifier,
id_of: F
) -> Option<A> where
A: Clone,
F: Fn(&A) -> Identifier,
Identifier: PartialEq,
Find an atrifact in the given History
using the artifacts ID.
This operation may fail if the artifact does not exist in the history.
pub fn find_in_histories<Identifier, F>(
histories: Vec<Self>,
identifier: &Identifier,
id_of: F
) -> Vec<Self> where
A: Clone,
F: Fn(&A) -> Identifier + Copy,
Identifier: PartialEq,
[src]
histories: Vec<Self>,
identifier: &Identifier,
id_of: F
) -> Vec<Self> where
A: Clone,
F: Fn(&A) -> Identifier + Copy,
Identifier: PartialEq,
Find all occurences of an artifact in a bag of History
s.
Trait Implementations
impl<A: Clone> Clone for History<A>
[src]
impl<A: Debug> Debug for History<A>
[src]
impl<A: Eq> Eq for History<A>
[src]
impl<A: Ord> Ord for History<A>
[src]
fn cmp(&self, other: &History<A>) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
1.21.0[src]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<A: PartialEq> PartialEq<History<A>> for History<A>
[src]
impl<A: PartialOrd> PartialOrd<History<A>> for History<A>
[src]
fn partial_cmp(&self, other: &History<A>) -> Option<Ordering>
[src]
fn lt(&self, other: &History<A>) -> bool
[src]
fn le(&self, other: &History<A>) -> bool
[src]
fn gt(&self, other: &History<A>) -> bool
[src]
fn ge(&self, other: &History<A>) -> bool
[src]
impl<A> StructuralEq for History<A>
[src]
impl<A> StructuralPartialEq for History<A>
[src]
Auto Trait Implementations
impl<A> RefUnwindSafe for History<A> where
A: RefUnwindSafe,
A: RefUnwindSafe,
impl<A> Send for History<A> where
A: Send,
A: Send,
impl<A> Sync for History<A> where
A: Sync,
A: Sync,
impl<A> Unpin for History<A> where
A: Unpin,
A: Unpin,
impl<A> UnwindSafe for History<A> where
A: UnwindSafe,
A: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,