Enum async_nats::jetstream::stream::DiscardPolicy
source · #[repr(u8)]pub enum DiscardPolicy {
Old = 0,
New = 1,
}
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 = 0
will remove older messages when limits are hit.
New = 1
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 for DiscardPolicy
impl PartialEq for DiscardPolicy
source§impl Serialize for DiscardPolicy
impl Serialize for DiscardPolicy
impl Copy for DiscardPolicy
impl Eq for DiscardPolicy
impl StructuralPartialEq for DiscardPolicy
Auto Trait Implementations§
impl Freeze for DiscardPolicy
impl RefUnwindSafe for DiscardPolicy
impl Send for DiscardPolicy
impl Sync for DiscardPolicy
impl Unpin for DiscardPolicy
impl UnwindSafe for DiscardPolicy
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)