correio/passwordless/memory

Bounded, explicitly owned local challenge store. Restart loses all rows.

Types

pub type Process(state)
pub opaque type Runtime(a)
pub type StartError {
  InvalidCapacity
  StartFailed
}

Constructors

  • InvalidCapacity
  • StartFailed

Values

pub fn start(capacity: Int) -> Result(Runtime(a), StartError)

Capacity is the total retained row count. Cleanup is explicit.

pub fn start_with_clock(
  capacity: Int,
  clock: fn() -> Int,
) -> Result(Runtime(a), StartError)

Test clock is sampled inside serialized commands, never before admission.

pub fn stop(runtime: Runtime(a)) -> Result(Nil, store.Fault)

Returns only after the process has stopped. Unknown does not prove completion.

pub fn store(runtime: Runtime(a)) -> store.Store(a)
✨ Search Document