mirror of
https://github.com/G2-Games/minidisc-cli.git
synced 2025-04-19 19:52:53 -05:00
Fixed doc failure
This commit is contained in:
parent
66863aad1e
commit
dba4ba0df4
2 changed files with 9 additions and 4 deletions
|
@ -27,6 +27,9 @@ targets = [
|
||||||
[lib]
|
[lib]
|
||||||
crate-type = ["cdylib", "rlib"]
|
crate-type = ["cdylib", "rlib"]
|
||||||
|
|
||||||
|
[dev-dependencies]
|
||||||
|
tokio-test = "0.4.3"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
diacritics = "0.2.0"
|
diacritics = "0.2.0"
|
||||||
encoding_rs = "0.8.33"
|
encoding_rs = "0.8.33"
|
||||||
|
|
10
src/lib.rs
10
src/lib.rs
|
@ -7,22 +7,24 @@
|
||||||
//! To use this library, first you need to get a device from [`cross_usb`] and
|
//! To use this library, first you need to get a device from [`cross_usb`] and
|
||||||
//! then open a [`NetMDContext`].
|
//! then open a [`NetMDContext`].
|
||||||
//!
|
//!
|
||||||
//! ```rust
|
//! ```no_run
|
||||||
//! use cross_usb::prelude::get_device;
|
//! # tokio_test::block_on(async {
|
||||||
|
//! use cross_usb::get_device;
|
||||||
//! use minidisc::netmd::base::DEVICE_IDS_CROSSUSB;
|
//! use minidisc::netmd::base::DEVICE_IDS_CROSSUSB;
|
||||||
//! use minidisc::NetMDContext;
|
//! use minidisc::NetMDContext;
|
||||||
//!
|
//!
|
||||||
//! // Get a device using the built-in list of descriptors for minidisc devices
|
//! // Get a device using the built-in list of descriptors for minidisc devices
|
||||||
//! let dev_descriptor = cross_usb::get_device(DEVICE_IDS_CROSSUSB).await
|
//! let dev_descriptor = cross_usb::get_device(DEVICE_IDS_CROSSUSB.to_vec()).await
|
||||||
//! .expect("Failed to find device");
|
//! .expect("Failed to find device");
|
||||||
//!
|
//!
|
||||||
//! // Open a NetMD Context with the device
|
//! // Open a NetMD Context with the device
|
||||||
//! let context = NetMDContext::new(dev_descriptor).await
|
//! let mut context = NetMDContext::new(dev_descriptor).await
|
||||||
//! .expect("Could not create context");
|
//! .expect("Could not create context");
|
||||||
//!
|
//!
|
||||||
//! // Perform operations on it ...
|
//! // Perform operations on it ...
|
||||||
//! context.list_content().await
|
//! context.list_content().await
|
||||||
//! .expect("Could not list disc contents");
|
//! .expect("Could not list disc contents");
|
||||||
|
//! # })
|
||||||
//! ```
|
//! ```
|
||||||
|
|
||||||
pub mod netmd;
|
pub mod netmd;
|
||||||
|
|
Loading…
Reference in a new issue