rx/lifecycle

Types

pub type Action {
  InstallTeardown
  Notify(protocol.Kind)
  Cancel
}

Constructors

pub type Command {
  Deliver
  RunStoredTeardown
  RunIncomingTeardown
  ReportProtocolError(protocol.ProtocolError)
  ReportDuplicateTeardown
}

Constructors

  • Deliver
  • RunStoredTeardown
  • RunIncomingTeardown
  • ReportProtocolError(protocol.ProtocolError)
  • ReportDuplicateTeardown
pub type State {
  Active(phase: protocol.Phase, teardown_ready: Bool)
  Closed
}

Constructors

Values

pub fn initial() -> State
pub fn transition(
  state: State,
  action: Action,
) -> #(State, List(Command))
Search Document