Expand description
A type-safe way to implement KeyOS servers.
Re-exports§
pub use xous;pub use xous_ipc;pub use xous_names;
Modules§
- rkyv_
with - Custom rkyv serialization helpers for KeyOS
Macros§
Structs§
- AllPermissions
- Archive
Event Subscriber - Handle for a single event subscriber
- Archive
Request - archive request with deferred response capability
- Archive
Response - deferred response that sends default on drop if not used
- Archive
SubList - Archived
Async Message Init - An archived
AsyncMessageInit - Archived
Event Subscription Message - An archived
EventSubscriptionMessage - Async
Message Init - Async
Message Init Resolver - The resolver for an archived
AsyncMessageInit - Blocking
Scalar Request - scalar request with deferred response capability
- Blocking
Scalar Response - deferred response that sends default on drop if not used
- Checked
Conn - A typed connection to a running KeyOS server.
- Deferred
Lend Mut - An encapsulated blocking
LendMutmessage, which can be responded to later during execution. It can be stored, and will return the message when dropped, or theDeferredLendMut::set_responsefunction is called. - Event
Subscription Message - Event
Subscription Message Resolver - The resolver for an archived
EventSubscriptionMessage - Owned
- Scalar
Event Subscriber - Handle for a single event subscriber
- Scalar
SubList - A list of scalar event subscribers.
- Server
Context - Handle representing the running server instance
- Simple
Memory Message - An easier to use version of [
xous::MemoryMessage] - With
AllPermissions
Enums§
- Error
- Infallible
- An error type that can never be constructed, similar to std::convert::Infallible but with rkyv serialization support.
Traits§
- Archive
- A message which can be serialized and deserialized using rkyv, with no response.
- Archive
Codec - serialization requirements for archive messages
- Archive
Event - A message which can be serialized and deserialized using rkyv.
- Archive
Event Handler - Handler for an incoming
ArchiveEvent - Archive
Event Subscription Handler - Archive
Handler - A
Archivemessage handler. - Archive
Response Handler - handle async responses from other servers
- Archive
Subscription - AsScalar
- Blocking
Archive - heap allocated message that expects a response
- Blocking
Archive Async Handler - handle archive messages asynchronously (can defer response)
- Blocking
Archive Handler - handle archive messages synchronously
- Blocking
Scalar - stack allocated message that expects a response
- Blocking
Scalar Async Handler - handle scalar messages asynchronously (can defer response)
- Blocking
Scalar Handler - handle scalar messages synchronously
- Blocking
Scalar Response Handler - handle async responses from other servers
- Checked
Permissions - Marker trait for the server name and compile-time permissions attached to a connection.
- Deferred
Lend MutHandler - An
DeferredLendMutmessage handler that can defer the response - From
Scalar - LendMut
- A message which is simply some mutably borrowed memory.
- Lend
MutHandler - A
LendMutmessage handler. - Lend
MutResponse - Message
Allowed - Compile-time proof that permissions type
Pmay send messageM. - Message
Id - Move
- A message which is simply a to-be-sent memory range
- Move
Handler - A
Movemessage handler. - Scalar
- stack allocated message with no response
- Scalar
Codec - encoding requirements for scalar messages
- Scalar
Event - A message which can be serialized and deserialized using scalar encoding.
- Scalar
Event Handler - Handler for an incoming
ScalarEvent - Scalar
Event Subscription Handler - A
ScalarSubscriptionhandler. - Scalar
Handler - handle fire-and-forget scalar messages
- Scalar
Subscription - Server
- A server.
- Server
Messages - This trait contains the actual message definitions that the server can handle.
It should not be used manually, but via the
#[derive(server::Server)]macro. - Subscription
Error
Functions§
- create_
sid - decode_
archive_ async_ response - decode async response from raw envelope
- decode_
archive_ event - decode_
scalar_ async_ response - decode async response from raw envelope
- decode_
scalar_ event - extract_
cancellation_ message - handle_
archive_ message - Message handler, used by ServerMessages::messages()
- handle_
archive_ subscription - Message handler, used by ServerMessages::messages()
- handle_
blocking_ archive_ message - Message handler, used by ServerMessages::messages()
- handle_
blocking_ scalar_ message - Message handler, used by ServerMessages::messages()
- handle_
deferred_ lend_ mut - Message handler, used by ServerMessages::messages()
- handle_
lend_ mut - Message handler, used by ServerMessages::messages()
- handle_
move - Message handler, used by ServerMessages::messages()
- handle_
scalar_ message - Message handler, used by ServerMessages::messages()
- handle_
scalar_ subscription - Message handler, used by ServerMessages::messages()
- lend_
mut - Send a
LendMutmessage. - listen
- Start the main loop of the server, where messages will be handled as they come in.
- listen_
and_ connect - Start a server in a background thread and open a connection to it.
- listen_
with - send_
archive - Send a
Archivemessage. Blocks if the queue is full. Cannot be used from an IRQ context. - send_
archive_ nowait - Try to send a
Archivemessage. Returns an error if the queue is full Can be used from an IRQ context. - send_
blocking_ archive - send archive message and block for response
- send_
blocking_ scalar - send scalar message and block for response
- send_
move - Send a
Movemessage (panics on failure) - send_
move_ nowait - Try sending a
Movemessage. Does not block if the message queue is full. Can be used in an IRQ handler. - send_
scalar - Send a
Scalarmessage. Blocks if queues are full. - send_
scalar_ async - send scalar message without blocking
returns the [
xous::MessageId] used for the reply - send_
scalar_ nowait - Try sending a
Scalarmessage, return error if the syscall queue is full. Can be used in an IRQ handler. - subscribe_
archive - Subscribe to an
ArchiveEventevent. - subscribe_
scalar - Subscribe to a
ScalarEventevent. - try_
decode_ archive_ async_ response - try_
decode_ archive_ event - try_
decode_ scalar_ async_ response - try to decode async response from raw envelope, returns error instead of panic
- try_
decode_ scalar_ event - try_
send_ blocking_ archive - send archive message, returns error instead of panic
- try_
send_ blocking_ scalar - send scalar message, returns error instead of panic
- try_
send_ move - Send a
Movemessage (fallible) - try_
send_ scalar - Send a
Scalarmessage. Blocks if queues are full. - try_
send_ scalar_ async - send async scalar message, returns error instead of panic
returns the [
xous::MessageId] used for the reply - try_
subscribe_ archive - try_
subscribe_ scalar
Type Aliases§
- Message
Def - A message that is known to be handled by a server. This is the type returned by the server message registration helpers.