transports
Types
pub type Transport(
encoded_msg,
encoded_omnistate,
down_reason,
transport_error,
) {
Transport(
listen: fn(TransportHandlers(encoded_omnistate)) -> Nil,
send: fn(encoded_msg) -> Nil,
)
}
Constructors
-
Transport( listen: fn(TransportHandlers(encoded_omnistate)) -> Nil, send: fn(encoded_msg) -> Nil, )
pub type TransportHandlers(encoded_omnistate) {
TransportHandlers(
on_up: fn() -> Nil,
on_down: fn(Int, String) -> Nil,
on_message: fn(encoded_omnistate) -> Nil,
on_init_error: fn(String) -> Nil,
)
}
Constructors
-
TransportHandlers( on_up: fn() -> Nil, on_down: fn(Int, String) -> Nil, on_message: fn(encoded_omnistate) -> Nil, on_init_error: fn(String) -> Nil, )