pub trait StatusNotificationHook {
    type Id;
    type Status;
    type Error: Debug;

    // Required method
    fn notify_status_change(
        id: Self::Id,
        status: Self::Status
    ) -> Result<(), Self::Error>;
}
Expand description

Trait to transmit a change of status for anything uniquely identifiable.

NOTE: The main use case to handle asynchronous operations.

Required Associated Types§

source

type Id

The identifying type

source

type Status

The type for possible states

source

type Error: Debug

The error type

Required Methods§

source

fn notify_status_change( id: Self::Id, status: Self::Status ) -> Result<(), Self::Error>

Notify that the status has changed for the given id

Object Safety§

This trait is not object safe.

Implementors§