Proposal

Struct Proposal 

Source
pub struct Proposal<'a> {
    pub id: String,
    pub at: Instant,
    pub actor: &'a dyn Viewer,
    pub command: Value,
}
Expand description

One client’s proposal, as the merge point sees it.

The reply channel is not here: what a host does with a Decision — a oneshot, a returned frame, a postMessage — is the host’s business, and is the one part of ingress that genuinely differs between a server and a tab.

Fields§

§id: String

The idempotency key that makes a retry after a reconnect safe (§4.3).

§at: Instant

When the merge point admitted it — the one place time enters (§3.7), read by the host from the clock it was configured with and data from here onwards.

§actor: &'a dyn Viewer

Who is proposing. A &dyn rather than a type parameter because the two hosts genuinely have different ones: a connection supplies a verified actor with claims, and a test or a tab supplies a name.

§command: Value

The command, already decoded against the program’s own Command union.

Auto Trait Implementations§

§

impl<'a> Freeze for Proposal<'a>

§

impl<'a> !RefUnwindSafe for Proposal<'a>

§

impl<'a> !Send for Proposal<'a>

§

impl<'a> !Sync for Proposal<'a>

§

impl<'a> Unpin for Proposal<'a>

§

impl<'a> !UnwindSafe for Proposal<'a>

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>,

Source§

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>,

Source§

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.