[][src]Struct ya_client_model::market::proposal::Proposal

pub struct Proposal {
    pub properties: Value,
    pub constraints: String,
    pub proposal_id: Option<String>,
    pub issuer_id: Option<String>,
    pub state: Option<State>,
    pub prev_proposal_id: Option<String>,
}

Fields

properties: Valueconstraints: Stringproposal_id: Option<String>issuer_id: Option<String>state: Option<State>
  • Initial - proposal arrived from the market as response to subscription
  • Draft - bespoke counter-proposal issued by one party directly to other party (negotiation phase)
  • Rejected by other party
  • Accepted - promoted into the Agreement draft
  • Expired - not accepted nor rejected before validity period
prev_proposal_id: Option<String>

id of the proposal from other side which this proposal responds to

Implementations

impl Proposal[src]

pub fn new(properties: Value, constraints: String) -> Proposal[src]

pub fn counter_demand(&self, demand: Demand) -> Result<Proposal, ErrorMessage>[src]

pub fn counter_offer(&self, offer: Offer) -> Result<Proposal, ErrorMessage>[src]

pub fn proposal_id(&self) -> Result<&String, ErrorMessage>[src]

pub fn issuer_id(&self) -> Result<&String, ErrorMessage>[src]

pub fn state(&self) -> Result<&State, ErrorMessage>[src]

pub fn prev_proposal_id(&self) -> Result<&String, ErrorMessage>[src]

Trait Implementations

impl Clone for Proposal[src]

impl Debug for Proposal[src]

impl<'de> Deserialize<'de> for Proposal[src]

impl PartialEq<Proposal> for Proposal[src]

impl Serialize for Proposal[src]

impl StructuralPartialEq for Proposal[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.