InboxType

PackageAxial.ElmishFlows

Inbox

Inbox<'value> is a dropping queue for synchronous UI input, created by Inbox.create capacity runtime. It shuts down with the runtime.

Operations

  • Inbox.offer value inbox is an Elmish command.
  • Inbox.post value inbox offers immediately and returns whether it was accepted.
  • Inbox.dropped inbox reports how many values were dropped, for when input can outpace the consumer.
  • Inbox.stream inbox exposes the inbox as a FlowStream. Pipe it through FlowStream.debounce and FlowStream.switchMapFlow for search-as-you-type, then subscribe to the resulting stream.

Specification

Kind
Type
Members
6
Examples
0
createSignature
Inbox.create capacity runtime
postSignature
Inbox.post value inbox
offerSignature
Inbox.offer value inbox
droppedSignature
Inbox.dropped inbox
streamSignature
Inbox.stream inbox

Summary

NameSignatureSynopsis
Operations
createInbox.create capacity runtimeNo description available.
postInbox.post value inboxNo description available.
offerInbox.offer value inboxNo description available.
droppedInbox.dropped inboxNo description available.
streamInbox.stream inboxNo description available.
Droppedthis.DroppedNo description available.

Operations

kind:member

create

Inbox.create capacity runtime
Member

Parameters

NameTypeDescription
capacityint
runtimeElmishRuntime<'env>

Returns

Inbox<'value>
kind:member

post

Inbox.post value inbox
Member

Parameters

NameTypeDescription
value'value
inboxInbox<'value>

Returns

bool
kind:member

offer

Inbox.offer value inbox
Member

Parameters

NameTypeDescription
value'a
inboxInbox<'a>

Returns

Cmd<'msg>
kind:member

dropped

Inbox.dropped inbox
Member

Parameters

NameTypeDescription
inboxInbox<'value>

Returns

int64
kind:member

stream

Inbox.stream inbox
Member

Parameters

NameTypeDescription
inboxInbox<'value>

Returns

FlowStream<'env, 'error, 'value>
kind:member

Dropped

this.Dropped
Member

Returns

int64