pub trait Server: Sized {
    type Event;

    // Required method
    fn on_write(
        &self,
        conn: &Connection,
        handle: u16,
        op: WriteOp,
        offset: usize,
        data: &[u8]
    ) -> Option<Self::Event>;

    // Provided methods
    fn on_deferred_read(
        &self,
        handle: u16,
        offset: usize,
        reply: DeferredReadReply
    ) -> Option<Self::Event> { ... }
    fn on_deferred_write(
        &self,
        handle: u16,
        op: WriteOp,
        offset: usize,
        data: &[u8],
        reply: DeferredWriteReply
    ) -> Option<Self::Event> { ... }
    fn on_notify_tx_complete(
        &self,
        conn: &Connection,
        count: u8
    ) -> Option<Self::Event> { ... }
    fn on_indicate_confirm(
        &self,
        conn: &Connection,
        handle: u16
    ) -> Option<Self::Event> { ... }
    fn on_services_changed_confirm(
        &self,
        conn: &Connection
    ) -> Option<Self::Event> { ... }
    fn on_timeout(&self, conn: &Connection) -> Option<Self::Event> { ... }
}

Required Associated Types§

Required Methods§

source

fn on_write( &self, conn: &Connection, handle: u16, op: WriteOp, offset: usize, data: &[u8] ) -> Option<Self::Event>

Provided Methods§

source

fn on_deferred_read( &self, handle: u16, offset: usize, reply: DeferredReadReply ) -> Option<Self::Event>

Handle reads of characteristics built with the deferred_read flag set.

Your Server must provide an implementation of this method if any of your characteristics has that flag set.

source

fn on_deferred_write( &self, handle: u16, op: WriteOp, offset: usize, data: &[u8], reply: DeferredWriteReply ) -> Option<Self::Event>

Handle writes of characteristics built with the deferred_write flag set.

Your Server must provide an implementation of this method if any of your characteristics has that flag set.

source

fn on_notify_tx_complete( &self, conn: &Connection, count: u8 ) -> Option<Self::Event>

Callback to indicate that one or more characteristic notifications have been transmitted.

source

fn on_indicate_confirm( &self, conn: &Connection, handle: u16 ) -> Option<Self::Event>

Callback to indicate that the indication of a characteristic has been received by the client.

source

fn on_services_changed_confirm(&self, conn: &Connection) -> Option<Self::Event>

Callback to indicate that the services changed indication has been received by the client.

source

fn on_timeout(&self, conn: &Connection) -> Option<Self::Event>

Object Safety§

This trait is not object safe.

Implementors§