RevsetExpression

Enum RevsetExpression 

Source
pub enum RevsetExpression {
Show 24 variants None, All, Commits(Vec<CommitId>), Symbol(String), Children(Rc<RevsetExpression>), Ancestors { heads: Rc<RevsetExpression>, generation: Range<u32>, }, Range { roots: Rc<RevsetExpression>, heads: Rc<RevsetExpression>, generation: Range<u32>, }, DagRange { roots: Rc<RevsetExpression>, heads: Rc<RevsetExpression>, }, Heads(Rc<RevsetExpression>), Roots(Rc<RevsetExpression>), VisibleHeads, PublicHeads, Branches(String), RemoteBranches { branch_needle: String, remote_needle: String, }, Tags, GitRefs, GitHead, Filter(RevsetFilterPredicate), AsFilter(Rc<RevsetExpression>), Present(Rc<RevsetExpression>), NotIn(Rc<RevsetExpression>), Union(Rc<RevsetExpression>, Rc<RevsetExpression>), Intersection(Rc<RevsetExpression>, Rc<RevsetExpression>), Difference(Rc<RevsetExpression>, Rc<RevsetExpression>),
}

Variants§

§

None

§

All

§

Commits(Vec<CommitId>)

§

Symbol(String)

§

Children(Rc<RevsetExpression>)

§

Ancestors

Fields

§generation: Range<u32>
§

Range

Fields

§generation: Range<u32>
§

DagRange

§

Heads(Rc<RevsetExpression>)

§

Roots(Rc<RevsetExpression>)

§

VisibleHeads

§

PublicHeads

§

Branches(String)

§

RemoteBranches

Fields

§branch_needle: String
§remote_needle: String
§

Tags

§

GitRefs

§

GitHead

§

Filter(RevsetFilterPredicate)

§

AsFilter(Rc<RevsetExpression>)

Marker for subtree that should be intersected as filter.

§

Present(Rc<RevsetExpression>)

§

NotIn(Rc<RevsetExpression>)

§

Union(Rc<RevsetExpression>, Rc<RevsetExpression>)

§

Intersection(Rc<RevsetExpression>, Rc<RevsetExpression>)

§

Difference(Rc<RevsetExpression>, Rc<RevsetExpression>)

Implementations§

Source§

impl RevsetExpression

Source

pub fn none() -> Rc<RevsetExpression>

Source

pub fn all() -> Rc<RevsetExpression>

Source

pub fn symbol(value: String) -> Rc<RevsetExpression>

Source

pub fn commit(commit_id: CommitId) -> Rc<RevsetExpression>

Source

pub fn commits(commit_ids: Vec<CommitId>) -> Rc<RevsetExpression>

Source

pub fn visible_heads() -> Rc<RevsetExpression>

Source

pub fn public_heads() -> Rc<RevsetExpression>

Source

pub fn branches(needle: String) -> Rc<RevsetExpression>

Source

pub fn remote_branches( branch_needle: String, remote_needle: String, ) -> Rc<RevsetExpression>

Source

pub fn tags() -> Rc<RevsetExpression>

Source

pub fn git_refs() -> Rc<RevsetExpression>

Source

pub fn git_head() -> Rc<RevsetExpression>

Source

pub fn filter(predicate: RevsetFilterPredicate) -> Rc<RevsetExpression>

Source

pub fn heads(self: &Rc<RevsetExpression>) -> Rc<RevsetExpression>

Commits in self that don’t have descendants in self.

Source

pub fn roots(self: &Rc<RevsetExpression>) -> Rc<RevsetExpression>

Commits in self that don’t have ancestors in self.

Source

pub fn parents(self: &Rc<RevsetExpression>) -> Rc<RevsetExpression>

Parents of self.

Source

pub fn ancestors(self: &Rc<RevsetExpression>) -> Rc<RevsetExpression>

Ancestors of self, including self.

Source

pub fn children(self: &Rc<RevsetExpression>) -> Rc<RevsetExpression>

Children of self.

Source

pub fn descendants(self: &Rc<RevsetExpression>) -> Rc<RevsetExpression>

Descendants of self, including self.

Source

pub fn dag_range_to( self: &Rc<RevsetExpression>, heads: &Rc<RevsetExpression>, ) -> Rc<RevsetExpression>

Commits that are descendants of self and ancestors of heads, both inclusive.

Source

pub fn connected(self: &Rc<RevsetExpression>) -> Rc<RevsetExpression>

Connects any ancestors and descendants in the set by adding the commits between them.

Source

pub fn range( self: &Rc<RevsetExpression>, heads: &Rc<RevsetExpression>, ) -> Rc<RevsetExpression>

Commits reachable from heads but not from self.

Source

pub fn negated(self: &Rc<RevsetExpression>) -> Rc<RevsetExpression>

Commits that are not in self, i.e. the complement of self.

Source

pub fn union( self: &Rc<RevsetExpression>, other: &Rc<RevsetExpression>, ) -> Rc<RevsetExpression>

Commits that are in self or in other (or both).

Source

pub fn intersection( self: &Rc<RevsetExpression>, other: &Rc<RevsetExpression>, ) -> Rc<RevsetExpression>

Commits that are in self and in other.

Source

pub fn minus( self: &Rc<RevsetExpression>, other: &Rc<RevsetExpression>, ) -> Rc<RevsetExpression>

Commits that are in self but not in other.

Source

pub fn evaluate<'repo>( &self, repo: &'repo dyn Repo, workspace_ctx: Option<&RevsetWorkspaceContext<'_>>, ) -> Result<Box<dyn Revset<'repo> + 'repo>, RevsetError>

Trait Implementations§

Source§

impl Clone for RevsetExpression

Source§

fn clone(&self) -> RevsetExpression

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RevsetExpression

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for RevsetExpression

Source§

fn eq(&self, other: &RevsetExpression) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for RevsetExpression

Source§

impl StructuralPartialEq for RevsetExpression

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,