Switched to channels for communication between different parts of the code
This commit is contained in:
@@ -2,6 +2,7 @@ use std::collections::HashMap;
|
||||
|
||||
use crate::{request::{Request, Intent, self}, device::GoogleHomeDevice, response::{sync, ResponsePayload, query, execute, Response, self, State}, errors::{DeviceError, ErrorCode}};
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct GoogleHome {
|
||||
user_id: String,
|
||||
// Add credentials so we can notify google home of actions
|
||||
|
||||
@@ -12,4 +12,5 @@ mod attributes;
|
||||
|
||||
pub use fullfillment::GoogleHome;
|
||||
pub use request::Request;
|
||||
pub use response::Response;
|
||||
pub use device::GoogleHomeDevice;
|
||||
|
||||
@@ -10,7 +10,7 @@ pub enum Trait {
|
||||
Scene,
|
||||
}
|
||||
|
||||
pub trait OnOff {
|
||||
pub trait OnOff: std::fmt::Debug {
|
||||
fn is_command_only(&self) -> Option<bool> {
|
||||
None
|
||||
}
|
||||
@@ -25,7 +25,7 @@ pub trait OnOff {
|
||||
}
|
||||
impl_cast::impl_cast!(GoogleHomeDevice, OnOff);
|
||||
|
||||
pub trait Scene {
|
||||
pub trait Scene: std::fmt::Debug {
|
||||
fn is_scene_reversible(&self) -> Option<bool> {
|
||||
None
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user