pub struct InputCapability<T: Timestamp> { /* private fields */ }Expand description
An capability of an input port.
Holding onto this capability will implicitly hold on to a capability for all the outputs ports this input is connected to, after the connection summaries have been applied.
This input capability supplies a retain_for_output(self) method which consumes the input
capability and turns it into a Capability for a specific output port.
Implementations§
Source§impl<T: Timestamp> InputCapability<T>
impl<T: Timestamp> InputCapability<T>
Sourcepub fn least(&self) -> Option<&T>where
T: TotalOrder,
pub fn least(&self) -> Option<&T>where
T: TotalOrder,
The least timestamp of the message’s stamp, if the stamp is non-empty.
This method exists only for totally ordered timestamps, where every non-empty stamp
has a least element: the time at which the message may first result in downstream
work, and the time at which to hold a capability for it. Partially ordered timestamps
have no such element; operators over them must read the whole
InputCapability::stamp and forward each of its elements.
Messages sent under no capabilities have an empty stamp and no least element. An
operator that needs a time should if let Some(time) = cap.least() and drop such
messages otherwise; they make no progress claims, and may arrive after the frontier
has passed every time in their contents.
Sourcepub fn delayed(&self, new_time: &T, output_port: usize) -> Capability<T>
pub fn delayed(&self, new_time: &T, output_port: usize) -> Capability<T>
Delays capability for a specific output port.
Makes a new capability for a timestamp new_time greater or equal to some element
of the stamp of the source capability (self).
This method panics if no element of self.stamp() is less or equal to new_time.
Sourcepub fn retain_least(&self, output_port: usize) -> Option<Capability<T>>where
T: TotalOrder,
pub fn retain_least(&self, output_port: usize) -> Option<Capability<T>>where
T: TotalOrder,
Transforms to an owned capability for a specific output port.
This method produces an owned capability which must be dropped to release the capability. Users should take care that these capabilities are only stored for as long as they are required, as failing to drop them may result in livelock.
The capability is for the least element of the stamp, and so exists only for totally
ordered timestamps; partially ordered timestamps must be retained with
InputCapability::retain_stamp, which holds a capability for each element. An
empty stamp yields no capability.
This method panics if the timestamp summary to output_port strictly advances the time.
Sourcepub fn retain_stamp(&self, output_port: usize) -> CapabilitySet<T>
pub fn retain_stamp(&self, output_port: usize) -> CapabilitySet<T>
Transforms to an owned capability set for a specific output port, with one capability for each element of the message’s stamp.
An empty stamp produces an empty capability set. Data sent through a session keyed by an empty capability set makes no progress claims, and may be delivered after downstream frontiers have advanced past all times in its contents.
This method panics if the timestamp summary to output_port strictly advances
any element of the stamp.
Trait Implementations§
Source§impl<T: Timestamp> CapabilityTrait<T> for InputCapability<T>
impl<T: Timestamp> CapabilityTrait<T> for InputCapability<T>
Source§fn stamp(&self) -> Stamp<T>
fn stamp(&self) -> Stamp<T>
Source§fn valid_for_output(
&self,
query_buffer: &Rc<RefCell<ChangeBatch<T>>>,
port: usize,
) -> bool
fn valid_for_output( &self, query_buffer: &Rc<RefCell<ChangeBatch<T>>>, port: usize, ) -> bool
Auto Trait Implementations§
impl<T> !RefUnwindSafe for InputCapability<T>
impl<T> !Send for InputCapability<T>
impl<T> !Sync for InputCapability<T>
impl<T> !UnwindSafe for InputCapability<T>
impl<T> Freeze for InputCapability<T>where
Rc<RefCell<Vec<Rc<RefCell<ChangeBatch<T>>>>>>: Freeze,
Rc<OnceCell<PortConnectivity<<T as Timestamp>::Summary>>>: Freeze,
ConsumedGuard<T>: Freeze,
impl<T> Unpin for InputCapability<T>where
Rc<RefCell<Vec<Rc<RefCell<ChangeBatch<T>>>>>>: Unpin,
Rc<OnceCell<PortConnectivity<<T as Timestamp>::Summary>>>: Unpin,
ConsumedGuard<T>: Unpin,
impl<T> UnsafeUnpin for InputCapability<T>where
Rc<RefCell<Vec<Rc<RefCell<ChangeBatch<T>>>>>>: UnsafeUnpin,
Rc<OnceCell<PortConnectivity<<T as Timestamp>::Summary>>>: UnsafeUnpin,
ConsumedGuard<T>: UnsafeUnpin,
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
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> ⓘ
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> ⓘ
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