Struct ros2_client::service::request_id::SequenceNumber
source · pub struct SequenceNumber(/* private fields */);
Expand description
RTPS Specification v2.3 Section “8.3.5.4 SequenceNumber”
Implementations§
source§impl SequenceNumber
impl SequenceNumber
pub const SEQUENCENUMBER_UNKNOWN: SequenceNumber = _
pub fn new(value: i64) -> SequenceNumber
pub const fn zero() -> SequenceNumber
pub const fn plus_1(&self) -> SequenceNumber
pub fn next(&self) -> SequenceNumber
pub fn from_high_low(high: i32, low: u32) -> SequenceNumber
pub fn high(&self) -> i32
pub fn low(&self) -> u32
source§impl SequenceNumber
impl SequenceNumber
pub fn range_inclusive( begin: SequenceNumber, end: SequenceNumber ) -> SequenceNumberRange
Trait Implementations§
source§impl Add for SequenceNumber
impl Add for SequenceNumber
§type Output = SequenceNumber
type Output = SequenceNumber
The resulting type after applying the
+
operator.source§fn add(self, other: SequenceNumber) -> SequenceNumber
fn add(self, other: SequenceNumber) -> SequenceNumber
Performs the
+
operation. Read moresource§impl CheckedAdd for SequenceNumber
impl CheckedAdd for SequenceNumber
source§fn checked_add(&self, v: &SequenceNumber) -> Option<SequenceNumber>
fn checked_add(&self, v: &SequenceNumber) -> Option<SequenceNumber>
Adds two numbers, checking for overflow. If overflow happens,
None
is
returned.source§impl CheckedDiv for SequenceNumber
impl CheckedDiv for SequenceNumber
source§fn checked_div(&self, v: &SequenceNumber) -> Option<SequenceNumber>
fn checked_div(&self, v: &SequenceNumber) -> Option<SequenceNumber>
Divides two numbers, checking for underflow, overflow and division by
zero. If any of that happens,
None
is returned.source§impl CheckedMul for SequenceNumber
impl CheckedMul for SequenceNumber
source§fn checked_mul(&self, v: &SequenceNumber) -> Option<SequenceNumber>
fn checked_mul(&self, v: &SequenceNumber) -> Option<SequenceNumber>
Multiplies two numbers, checking for underflow or overflow. If underflow
or overflow happens,
None
is returned.source§impl CheckedSub for SequenceNumber
impl CheckedSub for SequenceNumber
source§fn checked_sub(&self, v: &SequenceNumber) -> Option<SequenceNumber>
fn checked_sub(&self, v: &SequenceNumber) -> Option<SequenceNumber>
Subtracts two numbers, checking for underflow. If underflow happens,
None
is returned.source§impl Clone for SequenceNumber
impl Clone for SequenceNumber
source§fn clone(&self) -> SequenceNumber
fn clone(&self) -> SequenceNumber
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 SequenceNumber
impl Debug for SequenceNumber
source§impl Default for SequenceNumber
impl Default for SequenceNumber
source§fn default() -> SequenceNumber
fn default() -> SequenceNumber
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for SequenceNumber
impl<'de> Deserialize<'de> for SequenceNumber
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<SequenceNumber, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<SequenceNumber, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Div for SequenceNumber
impl Div for SequenceNumber
§type Output = SequenceNumber
type Output = SequenceNumber
The resulting type after applying the
/
operator.source§fn div(self, other: SequenceNumber) -> SequenceNumber
fn div(self, other: SequenceNumber) -> SequenceNumber
Performs the
/
operation. Read moresource§impl From<i32> for SequenceNumber
impl From<i32> for SequenceNumber
source§fn from(value: i32) -> SequenceNumber
fn from(value: i32) -> SequenceNumber
Converts to this type from the input type.
source§impl From<i64> for SequenceNumber
impl From<i64> for SequenceNumber
source§fn from(value: i64) -> SequenceNumber
fn from(value: i64) -> SequenceNumber
Converts to this type from the input type.
source§impl From<usize> for SequenceNumber
impl From<usize> for SequenceNumber
source§fn from(value: usize) -> SequenceNumber
fn from(value: usize) -> SequenceNumber
Converts to this type from the input type.
source§impl FromPrimitive for SequenceNumber
impl FromPrimitive for SequenceNumber
source§fn from_i64(n: i64) -> Option<SequenceNumber>
fn from_i64(n: i64) -> Option<SequenceNumber>
Converts an
i64
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.source§fn from_u64(n: u64) -> Option<SequenceNumber>
fn from_u64(n: u64) -> Option<SequenceNumber>
Converts an
u64
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.source§fn from_isize(n: isize) -> Option<SequenceNumber>
fn from_isize(n: isize) -> Option<SequenceNumber>
Converts an
isize
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.source§fn from_i8(n: i8) -> Option<SequenceNumber>
fn from_i8(n: i8) -> Option<SequenceNumber>
Converts an
i8
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.source§fn from_i16(n: i16) -> Option<SequenceNumber>
fn from_i16(n: i16) -> Option<SequenceNumber>
Converts an
i16
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.source§fn from_i32(n: i32) -> Option<SequenceNumber>
fn from_i32(n: i32) -> Option<SequenceNumber>
Converts an
i32
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.source§fn from_i128(n: i128) -> Option<SequenceNumber>
fn from_i128(n: i128) -> Option<SequenceNumber>
Converts an
i128
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read moresource§fn from_usize(n: usize) -> Option<SequenceNumber>
fn from_usize(n: usize) -> Option<SequenceNumber>
Converts a
usize
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.source§fn from_u8(n: u8) -> Option<SequenceNumber>
fn from_u8(n: u8) -> Option<SequenceNumber>
Converts an
u8
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.source§fn from_u16(n: u16) -> Option<SequenceNumber>
fn from_u16(n: u16) -> Option<SequenceNumber>
Converts an
u16
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.source§fn from_u32(n: u32) -> Option<SequenceNumber>
fn from_u32(n: u32) -> Option<SequenceNumber>
Converts an
u32
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.source§fn from_u128(n: u128) -> Option<SequenceNumber>
fn from_u128(n: u128) -> Option<SequenceNumber>
Converts an
u128
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read moresource§impl Hash for SequenceNumber
impl Hash for SequenceNumber
source§impl Mul for SequenceNumber
impl Mul for SequenceNumber
§type Output = SequenceNumber
type Output = SequenceNumber
The resulting type after applying the
*
operator.source§fn mul(self, other: SequenceNumber) -> SequenceNumber
fn mul(self, other: SequenceNumber) -> SequenceNumber
Performs the
*
operation. Read moresource§impl Ord for SequenceNumber
impl Ord for SequenceNumber
source§fn cmp(&self, other: &SequenceNumber) -> Ordering
fn cmp(&self, other: &SequenceNumber) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for SequenceNumber
impl PartialEq for SequenceNumber
source§fn eq(&self, other: &SequenceNumber) -> bool
fn eq(&self, other: &SequenceNumber) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for SequenceNumber
impl PartialOrd for SequenceNumber
source§fn partial_cmp(&self, other: &SequenceNumber) -> Option<Ordering>
fn partial_cmp(&self, other: &SequenceNumber) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl<'a, C> Readable<'a, C> for SequenceNumberwhere
C: Context,
impl<'a, C> Readable<'a, C> for SequenceNumberwhere
C: Context,
fn read_from<R>(reader: &mut R) -> Result<SequenceNumber, <C as Context>::Error>where
R: Reader<'a, C>,
fn minimum_bytes_needed() -> usize
fn read_from_buffer_with_ctx( context: C, buffer: &'a [u8] ) -> Result<Self, <C as Context>::Error>
fn read_with_length_from_buffer_with_ctx( context: C, buffer: &'a [u8] ) -> (Result<Self, <C as Context>::Error>, usize)
fn read_from_buffer_copying_data_with_ctx( context: C, buffer: &[u8] ) -> Result<Self, <C as Context>::Error>
fn read_with_length_from_buffer_copying_data_with_ctx( context: C, buffer: &[u8] ) -> (Result<Self, <C as Context>::Error>, usize)
fn read_with_length_from_buffer_copying_data_with_ctx_mut( context: &mut C, buffer: &[u8] ) -> (Result<Self, <C as Context>::Error>, usize)
fn read_from_stream_unbuffered_with_ctx<S>(
context: C,
stream: S
) -> Result<Self, <C as Context>::Error>where
S: Read,
fn read_from_stream_buffered_with_ctx<S>(
context: C,
stream: S
) -> Result<Self, <C as Context>::Error>where
S: Read,
fn read_from_file_with_ctx( context: C, path: impl AsRef<Path> ) -> Result<Self, <C as Context>::Error>
source§impl Rem for SequenceNumber
impl Rem for SequenceNumber
§type Output = SequenceNumber
type Output = SequenceNumber
The resulting type after applying the
%
operator.source§fn rem(self, other: SequenceNumber) -> SequenceNumber
fn rem(self, other: SequenceNumber) -> SequenceNumber
Performs the
%
operation. Read moresource§impl Serialize for SequenceNumber
impl Serialize for SequenceNumber
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
source§impl Sub for SequenceNumber
impl Sub for SequenceNumber
§type Output = SequenceNumber
type Output = SequenceNumber
The resulting type after applying the
-
operator.source§fn sub(self, other: SequenceNumber) -> SequenceNumber
fn sub(self, other: SequenceNumber) -> SequenceNumber
Performs the
-
operation. Read moresource§impl ToPrimitive for SequenceNumber
impl ToPrimitive for SequenceNumber
source§fn to_i64(&self) -> Option<i64>
fn to_i64(&self) -> Option<i64>
Converts the value of
self
to an i64
. If the value cannot be
represented by an i64
, then None
is returned.source§fn to_u64(&self) -> Option<u64>
fn to_u64(&self) -> Option<u64>
Converts the value of
self
to a u64
. If the value cannot be
represented by a u64
, then None
is returned.source§fn to_isize(&self) -> Option<isize>
fn to_isize(&self) -> Option<isize>
Converts the value of
self
to an isize
. If the value cannot be
represented by an isize
, then None
is returned.source§fn to_i8(&self) -> Option<i8>
fn to_i8(&self) -> Option<i8>
Converts the value of
self
to an i8
. If the value cannot be
represented by an i8
, then None
is returned.source§fn to_i16(&self) -> Option<i16>
fn to_i16(&self) -> Option<i16>
Converts the value of
self
to an i16
. If the value cannot be
represented by an i16
, then None
is returned.source§fn to_i32(&self) -> Option<i32>
fn to_i32(&self) -> Option<i32>
Converts the value of
self
to an i32
. If the value cannot be
represented by an i32
, then None
is returned.source§fn to_i128(&self) -> Option<i128>
fn to_i128(&self) -> Option<i128>
Converts the value of
self
to an i128
. If the value cannot be
represented by an i128
(i64
under the default implementation), then
None
is returned. Read moresource§fn to_usize(&self) -> Option<usize>
fn to_usize(&self) -> Option<usize>
Converts the value of
self
to a usize
. If the value cannot be
represented by a usize
, then None
is returned.source§fn to_u8(&self) -> Option<u8>
fn to_u8(&self) -> Option<u8>
Converts the value of
self
to a u8
. If the value cannot be
represented by a u8
, then None
is returned.source§fn to_u16(&self) -> Option<u16>
fn to_u16(&self) -> Option<u16>
Converts the value of
self
to a u16
. If the value cannot be
represented by a u16
, then None
is returned.source§fn to_u32(&self) -> Option<u32>
fn to_u32(&self) -> Option<u32>
Converts the value of
self
to a u32
. If the value cannot be
represented by a u32
, then None
is returned.source§fn to_u128(&self) -> Option<u128>
fn to_u128(&self) -> Option<u128>
Converts the value of
self
to a u128
. If the value cannot be
represented by a u128
(u64
under the default implementation), then
None
is returned. Read moresource§impl<C> Writable<C> for SequenceNumberwhere
C: Context,
impl<C> Writable<C> for SequenceNumberwhere
C: Context,
fn write_to<T>(&self, writer: &mut T) -> Result<(), <C as Context>::Error>
fn write_to_buffer_with_ctx( &self, context: C, buffer: &mut [u8] ) -> Result<(), <C as Context>::Error>
fn write_to_buffer_with_ctx_mut( &self, context: &mut C, buffer: &mut [u8] ) -> Result<(), <C as Context>::Error>
fn write_to_vec_with_ctx( &self, context: C ) -> Result<Vec<u8>, <C as Context>::Error>
fn write_to_vec_with_ctx_mut( &self, context: &mut C ) -> Result<Vec<u8>, <C as Context>::Error>
fn write_to_stream_with_ctx<S>(
&self,
context: C,
stream: S
) -> Result<(), <C as Context>::Error>where
S: Write,
fn write_to_file_with_ctx( &self, context: C, path: impl AsRef<Path> ) -> Result<(), <C as Context>::Error>
fn bytes_needed(&self) -> Result<usize, <C as Context>::Error>
impl Copy for SequenceNumber
impl Eq for SequenceNumber
impl StructuralPartialEq for SequenceNumber
Auto Trait Implementations§
impl Freeze for SequenceNumber
impl RefUnwindSafe for SequenceNumber
impl Send for SequenceNumber
impl Sync for SequenceNumber
impl Unpin for SequenceNumber
impl UnwindSafe for SequenceNumber
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