Skip to main content

Span

Struct Span 

Source
pub struct Span<T, B> {
    pub desc: Description<T>,
    pub inner: Option<B>,
}
Expand description

An interval of a trace’s history: a description of the times it covers, and the batch of updates within it, absent exactly when there are none.

The interval is never empty, but the batch may be missing; a span records that its times happened and brought no updates.

Fields§

§desc: Description<T>

The lower and upper bounds of contained update times, and the compaction frontier.

§inner: Option<B>

The updates within the interval; absent exactly when there are none.

Implementations§

Source§

impl<T, B> Span<T, B>

Source

pub fn new(desc: Description<T>, inner: Option<B>) -> Self

A span from a description and the batch within it, absent when there are no updates.

Source

pub fn lower(&self) -> &Antichain<T>

All times in the span are greater or equal to an element of lower.

Source

pub fn upper(&self) -> &Antichain<T>

All times in the span are not greater or equal to any element of upper.

Source

pub fn has_updates(&self) -> bool

True if the span carries a batch of updates.

This is about the updates, not the interval, which is never empty.

Source§

impl<T: Timestamp, B> Span<T, B>

Source

pub fn empty(lower: Antichain<T>, upper: Antichain<T>) -> Self

A span over the indicated interval carrying no updates.

Trait Implementations§

Source§

impl<T: Clone, B: Clone> Clone for Span<T, B>

Source§

fn clone(&self) -> Span<T, B>

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<T: Debug, B: Debug> Debug for Span<T, B>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<T, B> Freeze for Span<T, B>

§

impl<T, B> RefUnwindSafe for Span<T, B>

§

impl<T, B> Send for Span<T, B>
where Description<T>: Send, Option<B>: Send,

§

impl<T, B> Sync for Span<T, B>
where Description<T>: Sync, Option<B>: Sync,

§

impl<T, B> Unpin for Span<T, B>
where Description<T>: Unpin, Option<B>: Unpin,

§

impl<T, B> UnsafeUnpin for Span<T, B>

§

impl<T, B> UnwindSafe for Span<T, B>

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> 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<'a, S, T> Semigroup<&'a S> for T
where T: Semigroup<S>,

Source§

fn plus_equals(&mut self, rhs: &&'a S)

The method of std::ops::AddAssign, for types that do not implement AddAssign.
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 = !

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

fn try_from(value: U) -> Result<T, !>

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.