mirror of
https://github.com/G2-Games/minidisc-cli.git
synced 2025-04-19 03:32: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]
|
||||
crate-type = ["cdylib", "rlib"]
|
||||
|
||||
[dev-dependencies]
|
||||
tokio-test = "0.4.3"
|
||||
|
||||
[dependencies]
|
||||
diacritics = "0.2.0"
|
||||
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
|
||||
//! then open a [`NetMDContext`].
|
||||
//!
|
||||
//! ```rust
|
||||
//! use cross_usb::prelude::get_device;
|
||||
//! ```no_run
|
||||
//! # tokio_test::block_on(async {
|
||||
//! use cross_usb::get_device;
|
||||
//! use minidisc::netmd::base::DEVICE_IDS_CROSSUSB;
|
||||
//! use minidisc::NetMDContext;
|
||||
//!
|
||||
//! // 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");
|
||||
//!
|
||||
//! // 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");
|
||||
//!
|
||||
//! // Perform operations on it ...
|
||||
//! context.list_content().await
|
||||
//! .expect("Could not list disc contents");
|
||||
//! # })
|
||||
//! ```
|
||||
|
||||
pub mod netmd;
|
||||
|
|
Loading…
Reference in a new issue