Struct Queue

Source
pub struct Queue {
    pub sequence_no: u64,
    /* private fields */
}
Expand description

Defines a queue entity.

Fields§

§sequence_no: u64

The sequence number.

Implementations§

Source§

impl Queue

Source

pub fn new() -> NewQueue

Create a new queue within Event computation.

Source

pub fn is_empty(queue: Grc<Queue>) -> impl Event<Item = bool> + Clone

Test whether the queue is empty.

Source

pub fn content(queue: Grc<Queue>) -> impl Event<Item = isize> + Clone

Return the current queue content.

Source

pub fn content_stats( queue: Grc<Queue>, ) -> impl Event<Item = TimingStats<isize>> + Clone

Return the queue content statistics.

Source

pub fn content_changed( queue: Grc<Queue>, ) -> impl Observable<Message = isize> + Clone

Triggered when the content property changes.

Source

pub fn content_changed_(&self) -> impl Observable<Message = ()> + Clone

Triggered when the content property changes.

Source

pub fn enqueue_count(queue: Grc<Queue>) -> impl Event<Item = isize> + Clone

Return the total number of input items that were enqueued.

Source

pub fn enqueue_count_changed( queue: Grc<Queue>, ) -> impl Observable<Message = isize> + Clone

Triggered when the enqueue_count property changes.

Source

pub fn enqueue_count_changed_(&self) -> impl Observable<Message = ()> + Clone

Triggered when the enqueue_count property changes.

Source

pub fn enqueue_zero_entry_count( queue: Grc<Queue>, ) -> impl Event<Item = isize> + Clone

Return the total number of zero entry items.

Source

pub fn enqueue_zero_entry_count_changed( queue: Grc<Queue>, ) -> impl Observable<Message = isize> + Clone

Triggered when the enqueue_zero_entry_count property changes.

Source

pub fn enqueue_zero_entry_count_changed_( &self, ) -> impl Observable<Message = ()> + Clone

Triggered when the enqueue_zero_entry_count property changes.

Source

pub fn wait_time( queue: Grc<Queue>, ) -> impl Event<Item = SamplingStats<f64>> + Clone

Return the wait (or residence) time.

Source

pub fn wait_time_changed( queue: Grc<Queue>, ) -> impl Observable<Message = SamplingStats<f64>> + Clone

Triggered when the wait_time property changes.

Source

pub fn wait_time_changed_(&self) -> impl Observable<Message = ()> + Clone

Triggered when the wait_time property changes.

Source

pub fn non_zero_entry_wait_time( queue: Grc<Queue>, ) -> impl Event<Item = SamplingStats<f64>> + Clone

Return the wait (or residence) time by excluding zero entries.

Source

pub fn non_zero_entry_wait_time_changed( queue: Grc<Queue>, ) -> impl Observable<Message = SamplingStats<f64>> + Clone

Triggered when the wait_time property changes.

Source

pub fn non_zero_entry_wait_time_changed_( &self, ) -> impl Observable<Message = ()> + Clone

Triggered when the non_zero_entry_wait_time property changes.

Source

pub fn rate(queue: Grc<Queue>) -> impl Event<Item = f64> + Clone

Return a long-term average queue rate calculated as the average queue content divided by the average wait time.

Source

pub fn rate_changed(queue: Grc<Queue>) -> impl Observable<Message = f64> + Clone

Triggered when the rate property changes.

Source

pub fn rate_changed_(&self) -> impl Observable<Message = ()> + Clone

Triggered when the rate property changes.

Source

pub fn enqueued(&self) -> impl Observable<Message = ()> + Clone

Notifies when enqueuing an item.

Source

pub fn dequeued(&self) -> impl Observable<Message = ()> + Clone

Notifies when dequeuing the item.

Source

pub fn enqueue( queue: Grc<Queue>, transact_id: Grc<TransactId>, increment: isize, ) -> Enqueue

Enqueue the item.

Source

pub fn dequeue( queue: Grc<Queue>, transact_id: Grc<TransactId>, decrement: isize, ) -> Dequeue

Dequeue the item.

Source

pub fn changed_(&self) -> impl Observable<Message = ()> + Clone

Signal whenever any property of the queue changes.

Source

pub fn reset(queue: Grc<Queue>) -> impl Event<Item = ()> + Clone

Reset the statistics.

Trait Implementations§

Source§

impl Hash for Queue

Source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for Queue

Source§

fn eq(&self, other: &Self) -> 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 Queue

Auto Trait Implementations§

§

impl !Freeze for Queue

§

impl !RefUnwindSafe for Queue

§

impl !Send for Queue

§

impl !Sync for Queue

§

impl Unpin for Queue

§

impl !UnwindSafe for Queue

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> 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, 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