Skip to main content

Shop

Struct Shop 

Source
pub struct Shop;
Expand description

The reference domain every interpretation is held to.

Trait Implementations§

Source§

impl Clone for Shop

Source§

fn clone(&self) -> Shop

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Shop

Source§

impl Debug for Shop

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Shop

Source§

fn default() -> Shop

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

impl ShopAlg for Shop

Source§

async fn item(&self, id: u32) -> Result<u32, IoError>

Returns the reading recorded for id, or why it could not be read.
Source§

async fn items(&self) -> Vec<u32>

Returns every reading.
Source§

async fn add(&self, value: u32) -> u32

Records value and returns it.
Source§

async fn note(&self, note: String) -> String

Notes what was sent and says what it made of it.
Source§

async fn clear(&self)

Forgets every reading.
Source§

async fn home(&self) -> String

Returns where the readings actually live.
Source§

async fn page(&self) -> String

Returns the readings as a page.
Source§

async fn stored(&self) -> Vec<u8>

Returns the readings as they are stored.
Source§

async fn who(&self, session: String) -> String

Returns who the caller is in, as they said.
Source§

async fn agent(&self, agent: String) -> String

Returns what the caller says they are.
Source§

async fn cached(&self) -> (String, Vec<u32>)

Returns the readings and how long they may be kept.
Source§

impl SlowAlg for Shop

Source§

async fn slow(&self) -> String

Returns what the domain has to say, once it has taken longer than any drain.
Source§

async fn pause(&self) -> String

Returns what the domain has to say, once it has paused for less than any drain.
Source§

impl TicksAlg for Shop

Source§

async fn ticks(&self) -> Ticks

Returns what the domain has to say, a piece at a time.
Source§

impl UploadAlg for Shop

Source§

async fn uploaded(&self, stated: Vec<String>) -> String

Returns what the domain makes of everything the parts stated.
Source§

impl WideAlg for Shop

Source§

async fn wide(&self, stated: Vec<String>) -> String

Returns what the domain makes of everything stated.

Auto Trait Implementations§

§

impl Freeze for Shop

§

impl RefUnwindSafe for Shop

§

impl Send for Shop

§

impl Sync for Shop

§

impl Unpin for Shop

§

impl UnsafeUnpin for Shop

§

impl UnwindSafe for Shop

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<This> HttpProgramExt<This> for This

Source§

fn compile_http<Program>( &self, program: Program, ) -> <Program as HttpProgramAlg<This>>::Route
where Program: HttpProgramAlg<This>,

Compiles a named HTTP program with this interpreter.

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<This> LifecycleApiExt<This> for This

Source§

fn lifecycle_api<Alg>(&self) -> LifecycleApiProgram<Alg>
where Alg: ShopAlg + SlowAlg,

Declares one endpoint answering at once and one taking longer than any drain.

Source§

impl<This> MultipartApiExt<This> for This

Source§

fn multipart_api<Alg>(&self) -> MultipartApiProgram<Alg>
where Alg: UploadAlg,

Declares one endpoint reading a body that arrives as parts.

Source§

impl<This> ShapeProgramExt<This> for This

Source§

fn compile_shape<Program>( &self, program: Program, ) -> <Program as ShapeProgramAlg<This>>::Ty
where Program: ShapeProgramAlg<This>,

Folds a declaration with this interpretation.

Source§

impl<This> ShopApiExt<This> for This

Source§

fn shop_api<Alg>(&self) -> ShopApiProgram<Alg>
where Alg: ShopAlg,

Declares the surface every interpretation is held to.

Source§

impl<This> ShopOperationExt<This> for This
where This: ShopAlg,

Source§

async fn shop_item(&self, id: u32) -> Result<u32, Error>

Returns one identified reading, or why it could not be read.

Source§

async fn shop_items(&self) -> Vec<u32>

Returns every reading.

Source§

async fn shop_add(&self, value: u32) -> u32

Records one reading and returns it.

Source§

async fn shop_fill(&self, amount: Amount) -> u32

Records one reading sent as a form and returns it.

Source§

async fn shop_note(&self, note: String) -> String

Notes what was sent and says what it made of it.

Source§

async fn shop_clear(&self)

Forgets every reading.

Source§

async fn shop_home(&self) -> String

Returns where the readings actually live.

Source§

async fn shop_page(&self) -> String

Returns the readings as a page.

Source§

async fn shop_stored(&self) -> Vec<u8>

Returns the readings as they are stored.

Source§

async fn shop_who(&self, session: Session) -> String

Returns who the caller says they are.

Source§

async fn shop_agent(&self, agent: Agent) -> String

Returns what the caller says they are.

Source§

async fn shop_cached(&self) -> (String, Vec<u32>)

Returns the readings, and how long a caller may keep them.

Source§

impl<This> SlowOperationExt<This> for This
where This: SlowAlg,

Source§

async fn shop_slow(&self) -> String

Answers slowly enough that the caller is still waiting when the server closes.

Takes longer to answer than any interpretation waits before closing anyway, so a caller asking for this holds a connection the server is still producing an answer on. It exists for the lifecycle scenario, which needs a connection that outlives a close.

Source§

async fn shop_pause(&self) -> String

Answers while the server is closing, rather than after it has closed.

Takes less time to answer than any interpretation waits before closing anyway, so a caller asking for this is answered by a server that is already shutting down. It is the other half of what the lifecycle scenario needs: a request in flight that a close does not cut off.

Source§

impl<This> StreamApiExt<This> for This

Source§

fn stream_api<Alg>(&self) -> StreamApiProgram<Alg>
where Alg: TicksAlg,

Declares one endpoint answering with a body produced over time.

Source§

impl<This> TicksOperationExt<This> for This
where This: TicksAlg,

Source§

async fn shop_ticks(&self) -> Ticks

Returns what the domain has to say, a piece at a time.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.
Source§

impl<This> UploadOperationExt<This> for This
where This: UploadAlg,

Source§

async fn shop_upload(&self, upload: Upload) -> String

Returns what the domain makes of a body sent as parts.

Source§

impl<This> WideApiExt<This> for This

Source§

fn wide_api<Alg>(&self) -> WideApiProgram<Alg>
where Alg: WideAlg,

Declares one endpoint reading sixteen arguments.

Source§

impl<This> WideOperationExt<This> for This
where This: WideAlg,

Source§

async fn wide_all( &self, first: String, second: String, third: String, fourth: String, fifth: String, sixth: String, seventh: String, eighth: String, ninth: String, tenth: String, eleventh: String, twelfth: String, thirteenth: String, fourteenth: String, fifteenth: String, sixteenth: String, ) -> String

Returns what the domain makes of sixteen stated arguments.