#[repr(C)]pub struct OrderId {
pub seqid: Uuid,
pub seqno: u64,
}
Expand description
System-unique, persistent order identifiers
Fields§
§seqid: Uuid
§seqno: u64
Implementations§
Source§impl OrderId
impl OrderId
Sourcepub fn nil(seqno: u64) -> Self
pub fn nil(seqno: u64) -> Self
For use in tests and non-effecting operations only!
For production use, use an OrderIdAllocator from the sdk
crate.
pub fn random() -> Self
pub fn exchange(namespace: &Uuid, exchange_id: impl AsRef<[u8]>) -> Self
pub fn as_bytes(&self) -> &[u8] ⓘ
pub fn try_from_bytes(bytes: impl AsRef<[u8]>) -> Result<Self>
pub fn encode_base64(&self) -> String
pub fn decode_base64(s: impl AsRef<[u8]>) -> Result<Self>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for OrderId
impl<'de> Deserialize<'de> for OrderId
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 Distribution<OrderId> for StandardUniform
impl Distribution<OrderId> for StandardUniform
Source§impl JsonSchema for OrderId
impl JsonSchema for OrderId
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moreSource§impl Ord for OrderId
impl Ord for OrderId
Source§impl PartialOrd for OrderId
impl PartialOrd for OrderId
impl Copy for OrderId
impl Eq for OrderId
impl Pod for OrderId
impl StructuralPartialEq for OrderId
Auto Trait Implementations§
impl Freeze for OrderId
impl RefUnwindSafe for OrderId
impl Send for OrderId
impl Sync for OrderId
impl Unpin for OrderId
impl UnwindSafe for OrderId
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> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self
must have the same layout as the specified Bits
except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern
.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self
.