This commit is contained in:
parent
8022b65991
commit
159abd36d9
6 changed files with 7 additions and 7 deletions
|
|
@ -8,10 +8,14 @@ use crate::{
|
|||
/// Binary operations for use with the [BitVecCommand] command.
|
||||
#[derive(Clone, PartialEq, Eq, Debug, Default)]
|
||||
pub enum BinaryOperation {
|
||||
/// r := a
|
||||
#[default]
|
||||
Overwrite,
|
||||
/// r := a && b
|
||||
And,
|
||||
/// r := a || b
|
||||
Or,
|
||||
/// r := (a || b) && (a != b)
|
||||
Xor,
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ use std::fmt::Debug;
|
|||
/// connection.send(FadeOutCommand).unwrap();
|
||||
/// ```
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
/// ```
|
||||
pub struct FadeOutCommand;
|
||||
|
||||
impl TryFrom<Packet> for FadeOutCommand {
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ use std::fmt::Debug;
|
|||
/// connection.send(HardResetCommand).unwrap();
|
||||
/// ```
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
/// ```
|
||||
pub struct HardResetCommand;
|
||||
|
||||
impl TryFrom<Packet> for HardResetCommand {
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ pub enum TypedCommand {
|
|||
BitmapLegacy(BitmapLegacyCommand),
|
||||
}
|
||||
|
||||
/// Err values for [Command::try_from].
|
||||
/// Err values for [TypedCommand::try_from].
|
||||
#[derive(Debug, PartialEq, thiserror::Error)]
|
||||
pub enum TryFromPacketError {
|
||||
/// the contained command code does not correspond to a known command
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ use std::string::FromUtf8Error;
|
|||
|
||||
/// A grid containing UTF-8 characters.
|
||||
///
|
||||
/// To send a CharGrid to the display, use [Command::Utf8Data](crate::Command::Utf8Data).
|
||||
/// To send a CharGrid to the display, use a [crate::CharGridCommand].
|
||||
///
|
||||
/// Also see [ValueGrid] for the non-specialized operations and examples.
|
||||
///
|
||||
|
|
|
|||
|
|
@ -56,9 +56,7 @@ pub type Payload = Vec<u8>;
|
|||
///
|
||||
/// Contents should probably only be used directly to use features not exposed by the library.
|
||||
///
|
||||
/// You may want to use [Command] instead.
|
||||
///
|
||||
///
|
||||
/// You may want to use [crate::Command] or [crate::TypedCommand] instead.
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
pub struct Packet {
|
||||
/// Meta-information for the packed command
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue