jacdac-rs 0.1.0

jacdac-rs is a library written entirely in Rust, with the aim of providing jacdac support for embedded development
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use core::fmt::Debug;
use downcast_rs::{impl_downcast, Downcast};

use super::{
    reports::{ActionReport, EventReport},
    serivce_error::ServiceError,
};

pub trait Service: Debug + Downcast {
    fn handle_event_report(&mut self, event: EventReport) -> Result<(), ServiceError>;
    fn handle_action_report(&mut self, action: ActionReport) -> Result<(), ServiceError>;
}

impl_downcast!(Service);