export some builtin traits,
brightness conversion fails for invalid values, macros for wrapping attrs
This commit is contained in:
parent
bffc905261
commit
f4c7519658
21 changed files with 210 additions and 133 deletions
|
@ -1,3 +1,4 @@
|
|||
use crate::commands::Command;
|
||||
use crate::{errors::ServicePointError, packet::Packet};
|
||||
use servicepoint::UdpSocketExt;
|
||||
use std::{net::UdpSocket, sync::Arc};
|
||||
|
@ -28,4 +29,11 @@ impl Connection {
|
|||
error: "send failed".to_string(),
|
||||
})
|
||||
}
|
||||
|
||||
pub fn send_command(
|
||||
&self,
|
||||
command: Arc<dyn Command>,
|
||||
) -> Result<(), ServicePointError> {
|
||||
self.send_packet(command.as_packet()?)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue