pub struct ProposalBuilder<AGENT, PROPOSALLIST, INTENT> { /* private fields */ }
Expand description

Builder for Proposal.

Implementations§

source§

impl<AGENT, PROPOSALLIST, INTENT> ProposalBuilder<AGENT, PROPOSALLIST, INTENT>

source

pub fn created<VALUE: Into<Option<DateTime<Utc>>>>(self, value: VALUE) -> Self

source

pub fn eligible_location<VALUE: Into<Option<SpatialThing>>>( self, value: VALUE ) -> Self

Location or area where the proposal is valid.

source

pub fn has_beginning<VALUE: Into<Option<DateTime<Utc>>>>( self, value: VALUE ) -> Self

The planned or actual beginning of a flow or process.

source

pub fn has_end<VALUE: Into<Option<DateTime<Utc>>>>(self, value: VALUE) -> Self

The planned or actual end of a flow or process.

source

pub fn in_scope_of<VALUE: Into<Vec<AGENT>>>(self, value: VALUE) -> Self

In the context of an agent, a grouping generally used for accounting, reporting.

source

pub fn listed_in<VALUE: Into<Option<PROPOSALLIST>>>(self, value: VALUE) -> Self

This proposal is part of a list of proposals.

source

pub fn name<VALUE: Into<Option<String>>>(self, value: VALUE) -> Self

An informal or formal textual identifier for an object. Does not imply uniqueness.

source

pub fn note<VALUE: Into<Option<String>>>(self, value: VALUE) -> Self

source

pub fn proposed_to<VALUE: Into<Option<AGENT>>>(self, value: VALUE) -> Self

The agent(s) to which the proposal is published.

source

pub fn publishes<VALUE: Into<Option<INTENT>>>(self, value: VALUE) -> Self

The primary intent(s) of this published proposal. Would be used in intent matching.

source

pub fn purpose<VALUE: Into<Option<ProposalPurpose>>>(self, value: VALUE) -> Self

The type of proposal, offer or request.

source

pub fn reciprocal<VALUE: Into<Option<INTENT>>>(self, value: VALUE) -> Self

The reciprocal intent(s) of this published proposal. Not meant to be used for intent matching.

source

pub fn unit_based<VALUE: Into<Option<bool>>>(self, value: VALUE) -> Self

This proposal contains unit based quantities, which can be multipied to create commitments; commonly seen in a price list or e-commerce.

source

pub fn build( self ) -> Result<Proposal<AGENT, PROPOSALLIST, INTENT>, ProposalBuilderError>

Builds a new Proposal.

§Errors

If a required field has not been initialized.

Trait Implementations§

source§

impl<AGENT, PROPOSALLIST, INTENT> Default for ProposalBuilder<AGENT, PROPOSALLIST, INTENT>

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<AGENT, PROPOSALLIST, INTENT> Freeze for ProposalBuilder<AGENT, PROPOSALLIST, INTENT>
where AGENT: Freeze, INTENT: Freeze, PROPOSALLIST: Freeze,

§

impl<AGENT, PROPOSALLIST, INTENT> RefUnwindSafe for ProposalBuilder<AGENT, PROPOSALLIST, INTENT>
where AGENT: RefUnwindSafe, INTENT: RefUnwindSafe, PROPOSALLIST: RefUnwindSafe,

§

impl<AGENT, PROPOSALLIST, INTENT> Send for ProposalBuilder<AGENT, PROPOSALLIST, INTENT>
where AGENT: Send, INTENT: Send, PROPOSALLIST: Send,

§

impl<AGENT, PROPOSALLIST, INTENT> Sync for ProposalBuilder<AGENT, PROPOSALLIST, INTENT>
where AGENT: Sync, INTENT: Sync, PROPOSALLIST: Sync,

§

impl<AGENT, PROPOSALLIST, INTENT> Unpin for ProposalBuilder<AGENT, PROPOSALLIST, INTENT>
where AGENT: Unpin, INTENT: Unpin, PROPOSALLIST: Unpin,

§

impl<AGENT, PROPOSALLIST, INTENT> UnwindSafe for ProposalBuilder<AGENT, PROPOSALLIST, INTENT>
where AGENT: UnwindSafe, INTENT: UnwindSafe, PROPOSALLIST: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.