export some builtin traits,

brightness conversion fails for invalid values,

macros for wrapping attrs
This commit is contained in:
Vinzenz Schroeter 2025-06-16 14:56:24 +02:00
parent bffc905261
commit f4c7519658
21 changed files with 210 additions and 133 deletions

View file

@ -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()?)
}
}