#[repr(u8)]pub enum DeliverPolicy {
All,
Last,
New,
ByStartSequence {
start_sequence: u64,
},
ByStartTime {
start_time: OffsetDateTime,
},
LastPerSubject,
}Expand description
DeliverPolicy determines how the consumer should select the first message to deliver.
Variants§
All
All causes the consumer to receive the oldest messages still present in the system. This is the default.
Last
Last will start the consumer with the last sequence received.
New
New will only deliver new messages that are received by the JetStream server
after the consumer is created.
ByStartSequence
ByStartSeq will look for a defined starting sequence to the consumer’s configured opt_start_seq
parameter.
ByStartTime
ByStartTime will select the first message with a timestamp >= to the consumer’s
configured opt_start_time parameter.
Fields
§
start_time: OffsetDateTimeLastPerSubject
LastPerSubject will start the consumer with the last message
for all subjects received.
Trait Implementations§
Source§impl Clone for DeliverPolicy
impl Clone for DeliverPolicy
Source§fn clone(&self) -> DeliverPolicy
fn clone(&self) -> DeliverPolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for DeliverPolicy
Source§impl Debug for DeliverPolicy
impl Debug for DeliverPolicy
Source§impl Default for DeliverPolicy
impl Default for DeliverPolicy
Source§fn default() -> DeliverPolicy
fn default() -> DeliverPolicy
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for DeliverPolicy
impl<'de> Deserialize<'de> for DeliverPolicy
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<DeliverPolicy, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<DeliverPolicy, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for DeliverPolicy
Source§impl PartialEq for DeliverPolicy
impl PartialEq for DeliverPolicy
Source§impl Serialize for DeliverPolicy
impl Serialize for DeliverPolicy
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for DeliverPolicy
Auto Trait Implementations§
impl Freeze for DeliverPolicy
impl RefUnwindSafe for DeliverPolicy
impl Send for DeliverPolicy
impl Sync for DeliverPolicy
impl Unpin for DeliverPolicy
impl UnsafeUnpin for DeliverPolicy
impl UnwindSafe for DeliverPolicy
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
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 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> ⓘ
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 moreSource§impl<T> MessageWire for Twhere
T: Serialize,
impl<T> MessageWire for Twhere
T: Serialize,
Source§type Wire = EncodedWire
type Wire = EncodedWire
The value’s wire:
EncodedWire or SerializedWire.impl<T> PublishedThrough<DefaultSlot> for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R> ReplyShape for R
impl<R> ReplyShape for R
type Body = R
type Headers = ()
Source§type Wire = EncodedReply
type Wire = EncodedReply
The reply’s wire:
EncodedReply or SerializedReply.