pub enum Payload {
Show 13 variants
Order(SmallOrder),
PaymentRequest(Option<SmallOrder>, String, Option<i64>),
TextMessage(String),
Peer(Peer),
RatingUser(u8),
Amount(i64),
Dispute(Uuid, Option<SolverDisputeInfo>),
CantDo(Option<CantDoReason>),
NextTrade(String, u32),
PaymentFailed(PaymentFailedInfo),
RestoreData(RestoreSessionInfo),
Ids(Vec<Uuid>),
Orders(Vec<SmallOrder>),
}Expand description
Typed payload attached to a MessageKind.
Each variant corresponds to a set of Action values that can legally
carry it (see MessageKind::verify). Serialized in snake_case so
that the variant name is the JSON discriminator.
Variants§
Order(SmallOrder)
A compact representation of an order used by Action::NewOrder.
PaymentRequest(Option<SmallOrder>, String, Option<i64>)
Lightning payment request plus optional amount override.
Used by Action::PayInvoice, Action::AddInvoice and
Action::TakeSell. The SmallOrder carries the matching order
when relevant; the String is a BOLT-11 invoice.
TextMessage(String)
Free-form text message used by DMs.
Peer(Peer)
Peer disclosure (trade pubkey and optional reputation).
RatingUser(u8)
Rating value the user wants to attach to a completed trade.
Amount(i64)
Raw amount in satoshis (for actions that accept an amount override).
Dispute(Uuid, Option<SolverDisputeInfo>)
Dispute context: the dispute id plus optional
SolverDisputeInfo bundle sent to solvers.
CantDo(Option<CantDoReason>)
Reason carried by a Action::CantDo response.
NextTrade(String, u32)
Next trade key and index announced by the maker of a range order
when it emits Action::Release or Action::FiatSent.
PaymentFailed(PaymentFailedInfo)
Retry configuration surfaced by Action::PaymentFailed.
RestoreData(RestoreSessionInfo)
Payload returned by the server on a session restore.
Ids(Vec<Uuid>)
Vector of order ids (lightweight listing).
Orders(Vec<SmallOrder>)
Vector of SmallOrder values (full listing).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Payload
impl<'de> Deserialize<'de> for Payload
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>,
Auto Trait Implementations§
impl Freeze for Payload
impl RefUnwindSafe for Payload
impl Send for Payload
impl Sync for Payload
impl Unpin for Payload
impl UnsafeUnpin for Payload
impl UnwindSafe for Payload
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
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>
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>
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