#[non_exhaustive]pub struct OffsetOption {
pub type_: OffsetOptionType,
pub value: i64,
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.type_: OffsetOptionType§value: i64Implementations§
Source§impl OffsetOption
impl OffsetOption
pub const POLICY_LAST_VALUE: i64 = 0
pub const POLICY_MIN_VALUE: i64 = 1
pub const POLICY_MAX_VALUE: i64 = 2
pub const fn new(type_: OffsetOptionType, value: i64) -> Self
pub const fn policy(policy: i64) -> Self
pub const fn offset(value: i64) -> Self
pub const fn tail_n(n: i64) -> Self
pub const fn timestamp(timestamp: i64) -> Self
pub const fn type_(&self) -> OffsetOptionType
pub fn set_type(&mut self, type_: OffsetOptionType)
pub const fn value(&self) -> i64
pub fn set_value(&mut self, value: i64)
Trait Implementations§
Source§impl Clone for OffsetOption
impl Clone for OffsetOption
Source§fn clone(&self) -> OffsetOption
fn clone(&self) -> OffsetOption
Returns a duplicate 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 OffsetOption
impl Debug for OffsetOption
Source§impl Default for OffsetOption
impl Default for OffsetOption
Source§impl<'de> Deserialize<'de> for OffsetOption
impl<'de> Deserialize<'de> for OffsetOption
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 Display for OffsetOption
impl Display for OffsetOption
Source§impl Hash for OffsetOption
impl Hash for OffsetOption
Source§impl PartialEq for OffsetOption
impl PartialEq for OffsetOption
Source§impl Serialize for OffsetOption
impl Serialize for OffsetOption
impl Copy for OffsetOption
impl Eq for OffsetOption
impl StructuralPartialEq for OffsetOption
Auto Trait Implementations§
impl Freeze for OffsetOption
impl RefUnwindSafe for OffsetOption
impl Send for OffsetOption
impl Sync for OffsetOption
impl Unpin for OffsetOption
impl UnsafeUnpin for OffsetOption
impl UnwindSafe for OffsetOption
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§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§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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> Serialize for T
impl<T> Serialize for T
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>
fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.