diff --git a/src/commands/bitvec.rs b/src/commands/bitvec.rs index 4791102..24b56f9 100644 --- a/src/commands/bitvec.rs +++ b/src/commands/bitvec.rs @@ -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, } diff --git a/src/commands/fade_out.rs b/src/commands/fade_out.rs index d840bf2..117bd7d 100644 --- a/src/commands/fade_out.rs +++ b/src/commands/fade_out.rs @@ -16,7 +16,6 @@ use std::fmt::Debug; /// connection.send(FadeOutCommand).unwrap(); /// ``` #[derive(Debug, Clone, PartialEq)] -/// ``` pub struct FadeOutCommand; impl TryFrom for FadeOutCommand { diff --git a/src/commands/hard_reset.rs b/src/commands/hard_reset.rs index 5d31deb..bcc5d95 100644 --- a/src/commands/hard_reset.rs +++ b/src/commands/hard_reset.rs @@ -16,7 +16,6 @@ use std::fmt::Debug; /// connection.send(HardResetCommand).unwrap(); /// ``` #[derive(Debug, Clone, PartialEq)] -/// ``` pub struct HardResetCommand; impl TryFrom for HardResetCommand { diff --git a/src/commands/mod.rs b/src/commands/mod.rs index 51d0802..30a5600 100644 --- a/src/commands/mod.rs +++ b/src/commands/mod.rs @@ -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 diff --git a/src/containers/char_grid.rs b/src/containers/char_grid.rs index 0a8f0c9..29b195b 100644 --- a/src/containers/char_grid.rs +++ b/src/containers/char_grid.rs @@ -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. /// diff --git a/src/packet.rs b/src/packet.rs index 2c29f56..14c35d7 100644 --- a/src/packet.rs +++ b/src/packet.rs @@ -56,9 +56,7 @@ pub type Payload = Vec; /// /// 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