Struct actyxos_sdk::OffsetOrMin [−][src]
pub struct OffsetOrMin(_);
Expand description
Event offset within a SourceId
’s stream or MIN value
The event offset is not a number, it rather is an identifier that can be compared
to other identifiers. There are 2^63 such values. The incr
and decr
functions
find the successor or predecessor, respectively. incr
does not return an option
because for the use-case of naming events within a stream it is impossible to exhaust
the available set of values.
The MIN value is not a valid offset, it is sorted before Offset::ZERO
.
Implementations
Zero offset, equal to Offset::ZERO
Maximum possible offset
the max Offset needs to fit into an i64 and also needs to be losslessly converted into an f64 due to interop with braindead languages that do not have proper integers.
See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER
Minimum value, predecessor of the ZERO offset
This function shall only be used from tests to manufacture events where needed.
It is intentionally hard to extract the wrapped number from this type because offsets do not support useful arithmetic operations.
Trait Implementations
Write any additional information about &self
beyond its binary representation. Read more
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
Performs the conversion.
Performs the conversion.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for OffsetOrMin
impl Send for OffsetOrMin
impl Sync for OffsetOrMin
impl Unpin for OffsetOrMin
impl UnwindSafe for OffsetOrMin
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
Performs the conversion.
Performs the conversion.
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more