pub struct MatchIxOffsets;Expand description
Match instruction data layout offsets (for cross-instruction references).
Layout for single maker (332 bytes):
[0]: discriminator (1 byte)[1..33]: taker_hash (32 bytes) <- taker message[33..98]: taker_compact (65 bytes) <- taker pubkey at offset 33+8=41[98..162]: taker_signature (64 bytes) <- taker signature[162]: num_makers (1 byte)[163..195]: maker_hash (32 bytes) <- maker message[195..260]: maker_compact (65 bytes) <- maker pubkey at offset 195+8=203[260..324]: maker_signature (64 bytes) <- maker signature[324..332]: maker_fill_amount (8 bytes)
Implementations§
Source§impl MatchIxOffsets
impl MatchIxOffsets
Sourcepub const TAKER_MESSAGE: u16 = 1
pub const TAKER_MESSAGE: u16 = 1
Taker hash (message) starts at offset 1
Sourcepub const TAKER_PUBKEY: u16 = 41
pub const TAKER_PUBKEY: u16 = 41
Taker compact.maker (pubkey) at 33+8
Sourcepub const TAKER_SIGNATURE: u16 = 98
pub const TAKER_SIGNATURE: u16 = 98
Taker signature at offset 98
Sourcepub const NUM_MAKERS: u16 = 162
pub const NUM_MAKERS: u16 = 162
num_makers at offset 162
Sourcepub fn maker_offsets(maker_index: usize) -> MakerOffsets
pub fn maker_offsets(maker_index: usize) -> MakerOffsets
Calculate offsets for a maker order in the match instruction data. Each maker entry is: hash(32) + compact(65) + sig(64) + fill(8) = 169 bytes
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MatchIxOffsets
impl RefUnwindSafe for MatchIxOffsets
impl Send for MatchIxOffsets
impl Sync for MatchIxOffsets
impl Unpin for MatchIxOffsets
impl UnwindSafe for MatchIxOffsets
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> 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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more