Skip to main content

Enqueued

Struct Enqueued 

Source
pub struct Enqueued { /* private fields */ }
Expand description

The outbox inserts one Notifier::notify produced.

Append Enqueued::statements to the caller’s own db.batch_atomic(..). Nothing is written until that batch runs.

Implementations§

Source§

impl Enqueued

Source

pub fn statements(&self) -> &[Statement]

The INSERTs to append to the caller’s batch, in subscription order.

Source

pub fn into_statements(self) -> Vec<Statement>

The statements, consumed.

Source

pub fn notification_id(&self) -> &str

The id shared by every row of this fan-out, and carried to the device in data.notification_id so a client that is reached on two devices can dedupe.

Source

pub fn len(&self) -> usize

How many devices this notification will be attempted on.

Devices, not statements: the batch may also carry the in-app inbox insert, which is not a send.

Source

pub fn is_empty(&self) -> bool

Whether nothing will be sent. An inbox row may still be written — see Enqueued::wrote_inbox — and an extra channel may still have a row queued — see Enqueued::channel_rows.

Source

pub fn channel_rows(&self) -> usize

How many extra-channel rows are in the batch (#764). One per registered channel that could reach the account — account level, whatever the account’s devices are doing.

Source

pub fn wrote_inbox(&self) -> bool

Whether the batch carries an in-app inbox row (#187).

Independent of Enqueued::is_empty: the inbox is written for an account with no device and for one whose push preference is off, because those switch off push, not the record.

Source

pub fn skipped(&self) -> Option<Skipped>

Why nothing will be pushed, when nothing will be.

Source

pub fn has_missing_translations(&self) -> bool

Whether the catalog could not render part of this message (#190).

The notification is still queued — with the message id as its text, so it is visible from both ends — and Notifier::announce says so on the bus.

Trait Implementations§

Source§

impl Clone for Enqueued

Source§

fn clone(&self) -> Self

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 Debug for Enqueued

Source§

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

Formats the value using the given formatter. Read more

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> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
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> 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 = !

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