diff --git a/Cargo.lock b/Cargo.lock index 030efe3..36e4b2a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -514,7 +514,9 @@ dependencies = [ [[package]] name = "servicepoint" -version = "0.14.1" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91a33bff7f9db5008748b23ca0c906c276fe00694390b681f004a55968a42cfe" dependencies = [ "bitvec", "bzip2", diff --git a/Cargo.toml b/Cargo.toml index 4cbe337..dd3d637 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,7 @@ crate-type = ["staticlib", "cdylib", "rlib"] cbindgen = "0.28.0" [dependencies.servicepoint] -version = "0.14.1" +version = "0.15.0" default-features = false [dependencies.env_logger] diff --git a/include/servicepoint.h b/include/servicepoint.h index 0f269ea..3721527 100644 --- a/include/servicepoint.h +++ b/include/servicepoint.h @@ -159,23 +159,28 @@ typedef uint8_t CommandTag; * * # Examples * + * create command without payload compression * ```rust * # use servicepoint::*; - * // create command without payload compression * # let pixels = Bitmap::max_sized(); * _ = BitmapCommand { * origin: Origin::ZERO, * bitmap: pixels, * compression: CompressionCode::Uncompressed * }; + * ``` * - * // create command with payload compressed with lzma and appropriate header flags + * create command with payload compressed with lzma and appropriate header flags + * ```rust + * # use servicepoint::*; * # let pixels = Bitmap::max_sized(); + * # #[cfg(feature = "compression_lzma")] { * _ = BitmapCommand { * origin: Origin::ZERO, * bitmap: pixels, * compression: CompressionCode::Lzma * }; + * # } * ``` */ enum CompressionCode @@ -331,8 +336,10 @@ typedef struct ClearCommand ClearCommand; * # use servicepoint::*; * # let connection = FakeConnection; * let grid = CharGrid::from("Hello,\nWorld!"); + * # #[cfg(feature = "cp437")] { * let grid = Cp437Grid::from(&grid); * connection.send_command(Cp437GridCommand{ origin: Origin::ZERO, grid }).expect("send failed"); + * # } * ``` * * ```rust