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

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

Fields

properties: Value

The object which includes all the Proposal properties. This is a JSON object in "flat convention" - where keys are full property names and their values indicate properties.

The value's Javascript type shall conform with the type of the property (as indicated in Golem Standards).

Example property object:

{
    "golem.com.pricing.model": "linear",
    "golem.com.pricing.model.linear.coeffs": [0.001, 0.002, 0.0],
    "golem.com.scheme": "payu",
    "golem.com.scheme.payu.interval_sec": 6.0,
    "golem.com.usage.vector": ["golem.usage.duration_sec", "golem.usage.cpu_sec"],
    "golem.inf.cpu.architecture": "x86_64",
    "golem.inf.cpu.cores": 4,
    "golem.inf.cpu.threads": 7,
    "golem.inf.mem.gib": 10.612468048930168,
    "golem.inf.storage.gib": 81.7227783203125,
    "golem.node.debug.subnet": "market-devnet",
    "golem.node.id.name": "tworec@mf-market-devnet",
    "golem.runtime.name": "vm",
    "golem.runtime.version@v": "0.1.0"
}
```        #[serde(rename = "properties")]
constraints: Stringproposal_id: Stringissuer_id: NodeIdstate: State

See State.

timestamp: DateTime<Utc>

Object creation timestamp

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_id: String,
    issuer_id: NodeId,
    state: State,
    timestamp: DateTime<Utc>
) -> Proposal
[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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,