add more documentation, add doc lint
This commit is contained in:
parent
3901efcf61
commit
e135bd60a7
11 changed files with 134 additions and 8 deletions
|
@ -30,4 +30,7 @@ all_compressions = ["compression_zlib", "compression_bzip2", "compression_lzma",
|
|||
[dev-dependencies]
|
||||
# for examples
|
||||
clap = { version = "4.5", features = ["derive"] }
|
||||
rand = "0.8"
|
||||
rand = "0.8"
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
|
|
@ -2,14 +2,19 @@
|
|||
#[repr(u16)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||
pub enum CompressionCode {
|
||||
/// no compression
|
||||
Uncompressed = 0x0,
|
||||
#[cfg(feature = "compression_zlib")]
|
||||
/// compress using flate2 with zlib header
|
||||
Zlib = 0x677a,
|
||||
#[cfg(feature = "compression_bzip2")]
|
||||
/// compress using bzip2
|
||||
Bzip2 = 0x627a,
|
||||
#[cfg(feature = "compression_lzma")]
|
||||
/// compress using lzma
|
||||
Lzma = 0x6c7a,
|
||||
#[cfg(feature = "compression_zstd")]
|
||||
/// compress using Zstandard
|
||||
Zstd = 0x7a73,
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,14 @@
|
|||
/// A two-dimensional grid of `T`
|
||||
pub trait Grid<T> {
|
||||
#[must_use]
|
||||
/// Creates a new Grid with the specified dimensions.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// - width: size in x-direction
|
||||
/// - height: size in y-direction
|
||||
///
|
||||
/// returns: Grid with all cells initialized to default state.
|
||||
fn new(width: usize, height: usize) -> Self;
|
||||
|
||||
/// Sets the value at the specified position
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
//! Abstractions for the UDP protocol of the CCCB servicepoint display.
|
||||
|
||||
use std::time::Duration;
|
||||
|
||||
pub use crate::bit_vec::BitVec;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue