#[repr(transparent)]pub struct OrderTag(_);
Implementations
sourceimpl OrderTag
impl OrderTag
sourcepub fn generate(
market_key_bytes: &[u8],
user_key_bytes: &[u8],
nonce: u64
) -> OrderTag
pub fn generate(
market_key_bytes: &[u8],
user_key_bytes: &[u8],
nonce: u64
) -> OrderTag
To generate an OrderTag, the program takes the sha256 hash of the orderbook user account and market pubkeys, a nonce tracked by the orderbook user account, and drops the last 16 bytes to create a 16-byte array
pub fn bytes(&self) -> &[u8; 16]
Trait Implementations
sourceimpl BorshDeserialize for OrderTag
impl BorshDeserialize for OrderTag
sourcefn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes. Read more
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
impl Copy for OrderTag
impl Eq for OrderTag
impl Pod for OrderTag
impl StructuralEq for OrderTag
impl StructuralPartialEq for OrderTag
Auto Trait Implementations
impl RefUnwindSafe for OrderTag
impl Send for OrderTag
impl Sync for OrderTag
impl Unpin for OrderTag
impl UnwindSafe for OrderTag
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
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
. Read more