pub struct RfqBinding { /* private fields */ }Expand description
An RFQ with its identities decoded and its offered terms resolved.
Build once per RFQ and reuse it for every quote on that RFQ.
Implementations§
Source§impl RfqBinding
impl RfqBinding
Sourcepub fn from_broadcast(
rfq: &RfqBroadcastMessage,
) -> Result<Self, QuoteBuildError>
pub fn from_broadcast( rfq: &RfqBroadcastMessage, ) -> Result<Self, QuoteBuildError>
Decode and validate an inbound RfqBroadcastMessage.
§Errors
Rejects malformed identities and inconsistent market descriptors. The
program is pinned to crate::ACTA_PROGRAM_ID, not the WS endpoint.
Sourcepub fn from_broadcast_for_program(
rfq: &RfqBroadcastMessage,
expected_program: [u8; 32],
) -> Result<Self, QuoteBuildError>
pub fn from_broadcast_for_program( rfq: &RfqBroadcastMessage, expected_program: [u8; 32], ) -> Result<Self, QuoteBuildError>
Use a caller-configured deployment ID, never an ID copied from the RFQ.
§Errors
Rejects identities or market terms inconsistent with the expected program.
pub const fn rfq_id(&self) -> Uuid
Sourcepub const fn quantity(&self) -> Quantity
pub const fn quantity(&self) -> Quantity
RFQ quantity used for pricing and included in the signed preimage.
pub const fn position_type(&self) -> PositionType
Sourcepub const fn terms(&self) -> OptionTerms
pub const fn terms(&self) -> OptionTerms
Complete terms selected by the taker for this RFQ.
pub const fn side(&self) -> TakerSide
Sourcepub const fn market_expiry(&self) -> QuoteExpiry
pub const fn market_expiry(&self) -> QuoteExpiry
Latest valid_until the venue accepts for this RFQ.
Sourcepub fn offered_terms(&self) -> &[OptionTerms]
pub fn offered_terms(&self) -> &[OptionTerms]
Every term set this RFQ will accept a quote on.
Sourcepub const fn quote(&self) -> QuoteBuilder<'_>
pub const fn quote(&self) -> QuoteBuilder<'_>
Start a quote on this RFQ’s requested terms.
Trait Implementations§
Source§impl Clone for RfqBinding
impl Clone for RfqBinding
Auto Trait Implementations§
impl Forget for RfqBinding
impl Freeze for RfqBinding
impl RefUnwindSafe for RfqBinding
impl Send for RfqBinding
impl Sync for RfqBinding
impl Unpin for RfqBinding
impl UnsafeUnpin for RfqBinding
impl UnwindSafe for RfqBinding
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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