Struct deno_kv::Enqueue

source ·
pub struct Enqueue {
    pub payload: Vec<u8>,
    pub deadline_ms: u64,
    pub keys_if_undelivered: Vec<Vec<u8>>,
    pub backoff_schedule: Option<Vec<u32>>,
}
Expand description

A request to enqueue a message to the database. This message is delivered to a listener of the queue at least once.

Retry

When the delivery of a message fails, it is retried for a finite number of times. Each retry happens after a backoff period. The backoff periods are specified by the backoff_schedule field in milliseconds. If unspecified, the default backoff schedule of the platform (CLI or Deploy) is used.

If all retry attempts failed, the message is written to the KV under all keys specified in keys_if_undelivered.

Fields§

§payload: Vec<u8>§deadline_ms: u64§keys_if_undelivered: Vec<Vec<u8>>§backoff_schedule: Option<Vec<u32>>

Trait Implementations§

source§

impl TryFrom<(ZeroCopyBuf, u64, Vec<Vec<AnyValue, Global>, Global>, Option<Vec<u32, Global>>)> for Enqueue

§

type Error = Error

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

fn try_from( value: (ZeroCopyBuf, u64, Vec<Vec<AnyValue>>, Option<Vec<u32>>) ) -> Result<Self, AnyError>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.