Enum async_nats::jetstream::stream::DiscardPolicy
source · #[repr(u8)]
pub enum DiscardPolicy {
Old,
New,
}
Expand description
DiscardPolicy
determines how we proceed when limits of messages or bytes are hit. The default, Old
will
remove older messages. New
will fail to store the new message.
Variants§
Old
will remove older messages when limits are hit.
New
will error on a StoreMsg call when limits are hit
Trait Implementations§
source§impl Clone for DiscardPolicy
impl Clone for DiscardPolicy
source§fn clone(&self) -> DiscardPolicy
fn clone(&self) -> DiscardPolicy
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for DiscardPolicy
impl Debug for DiscardPolicy
source§impl Default for DiscardPolicy
impl Default for DiscardPolicy
source§fn default() -> DiscardPolicy
fn default() -> DiscardPolicy
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for DiscardPolicy
impl<'de> Deserialize<'de> for DiscardPolicy
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq<DiscardPolicy> for DiscardPolicy
impl PartialEq<DiscardPolicy> for DiscardPolicy
source§fn eq(&self, other: &DiscardPolicy) -> bool
fn eq(&self, other: &DiscardPolicy) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.