Skip to main content

PrecedenceGraph

Struct PrecedenceGraph 

Source
pub struct PrecedenceGraph<I> { /* private fields */ }
Expand description

A validated finite precedence DAG over stable event ids.

Implementations§

Source§

impl PrecedenceGraph<SerialEventId>

Source

pub fn try_new( edges: impl IntoIterator<Item = (SerialEventId, SerialEventId)>, known_nodes: &BTreeSet<SerialEventId>, ) -> Result<Self, SerialPlanError>

Builds a graph from before -> after edges.

Source

pub fn contains_edge( &self, before: &SerialEventId, after: &SerialEventId, ) -> bool

Returns whether one direct precedence edge exists.

Source

pub fn successors( &self, event_id: &SerialEventId, ) -> Option<&BTreeSet<SerialEventId>>

Returns the outgoing precedence targets for one event.

Source

pub fn edges(&self) -> impl Iterator<Item = (&SerialEventId, &SerialEventId)>

Returns every direct precedence edge in canonical order.

Trait Implementations§

Source§

impl<I: Clone> Clone for PrecedenceGraph<I>

Source§

fn clone(&self) -> PrecedenceGraph<I>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<I: Debug> Debug for PrecedenceGraph<I>

Source§

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

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

impl<I: Ord> Default for PrecedenceGraph<I>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<I: Eq> Eq for PrecedenceGraph<I>

Source§

impl<I: PartialEq> PartialEq for PrecedenceGraph<I>

Source§

fn eq(&self, other: &PrecedenceGraph<I>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl<I: PartialEq> StructuralPartialEq for PrecedenceGraph<I>

Auto Trait Implementations§

§

impl<I> Freeze for PrecedenceGraph<I>

§

impl<I> RefUnwindSafe for PrecedenceGraph<I>
where I: RefUnwindSafe,

§

impl<I> Send for PrecedenceGraph<I>
where I: Send,

§

impl<I> Sync for PrecedenceGraph<I>
where I: Sync,

§

impl<I> Unpin for PrecedenceGraph<I>

§

impl<I> UnsafeUnpin for PrecedenceGraph<I>

§

impl<I> UnwindSafe for PrecedenceGraph<I>
where I: RefUnwindSafe,

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, 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> RealizationService for T
where T: Any + Send + Sync,

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Returns a downcast hook for typed access.
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.