Trait kernel::registry::RegisteredDriver

source ·
pub trait RegisteredDriver {
    type Request: 'static;
    type Response: 'static;
    type Error: 'static;
    type Hello: 'static;
    type ConnectError: 'static;

    const UUID: Uuid;

    // Provided method
    fn type_id() -> RegistryType { ... }
}
Expand description

A marker trait designating a registerable driver service.

Typically used with Registry::register or Registry::register_konly. A connection to the service can be established using Registry::connect, Registry::try_connect, Registry::connect_userspace, or `Registry::try_connect_userspace (depending on the service), after the service has been registered.

Required Associated Types§

source

type Request: 'static

This is the type of the request sent TO the driver service

source

type Response: 'static

This is the type of a SUCCESSFUL response sent FROM the driver service

source

type Error: 'static

This is the type of an UNSUCCESSFUL response sent FROM the driver service

source

type Hello: 'static

An initial message sent to the service by a client when establishing a connection.

This may be used by the service to route connections to specific resources owned by that service, or to determine whether or not the connection can be established. If the service does not require initial data from the client, this type can be set to [()].

source

type ConnectError: 'static

Errors returned by the service if an incoming connection handshake is rejected.

If the service does not reject connections, this should be set to core::convert::Infallible.

Required Associated Constants§

source

const UUID: Uuid

This is the UUID of the driver service

Provided Methods§

source

fn type_id() -> RegistryType

Get the TypeId used to make sure that driver instances are correctly typed. Corresponds to the same type ID as (Self::Request, Self::Response, Self::Error, Self::Hello, Self::ConnectError).

Object Safety§

This trait is not object safe.

Implementors§

source§

impl RegisteredDriver for EmbDisplayService

§

type Request = Request

§

type Response = Response

§

type Error = FrameError

§

type Hello = ()

§

type ConnectError = Infallible

source§

const UUID: Uuid = registry::known_uuids::kernel::EMB_DISPLAY_V2

source§

impl RegisteredDriver for SpawnulatorService

§

type Request = Request

§

type Response = Response

§

type Error = Infallible

§

type Hello = ()

§

type ConnectError = Infallible

source§

const UUID: Uuid = FORTH_SPAWNULATOR

source§

impl RegisteredDriver for I2cService

§

type Request = StartTransaction

§

type Response = Transaction

§

type Error = Infallible

§

type Hello = ()

§

type ConnectError = Infallible

source§

const UUID: Uuid = known_uuids::kernel::I2C

source§

impl RegisteredDriver for KeyboardMuxService

§

type Request = Publish

§

type Response = Response

§

type Error = Infallible

§

type Hello = ()

§

type ConnectError = Infallible

source§

const UUID: Uuid = known_uuids::kernel::KEYBOARD_MUX

source§

impl RegisteredDriver for KeyboardService

§

type Request = Subscribe

§

type Response = Subscribed

§

type Error = KeyboardError

§

type Hello = ()

§

type ConnectError = Infallible

source§

const UUID: Uuid = known_uuids::kernel::KEYBOARD

source§

impl RegisteredDriver for SdmmcService

§

type Request = Command

§

type Response = Response

§

type Error = Error

§

type Hello = ()

§

type ConnectError = Infallible

source§

const UUID: Uuid = known_uuids::kernel::SDMMC

source§

impl RegisteredDriver for SerialMuxService

§

type Request = Request

§

type Response = Response

§

type Error = SerialMuxError

§

type Hello = ()

§

type ConnectError = Infallible

source§

const UUID: Uuid = crate::registry::known_uuids::kernel::SERIAL_MUX

source§

impl RegisteredDriver for SimpleSerialService

§

type Request = Request

§

type Response = Response

§

type Error = SimpleSerialError

§

type Hello = ()

§

type ConnectError = Infallible

source§

const UUID: Uuid = known_uuids::kernel::SIMPLE_SERIAL_PORT