//! A crate to control the tray of your CD drive.
//!
//! [`Device`][device::Device] contains methods to open drives and send commands to them.
//!
//! [`cd_drives`][discovery::cd_drives] allows you to find all CD drives on a system.
//!
//! # Example
//!
//! ```no_run
//! use eject::{device::Device, discovery::cd_drives};
//!
//! // Open the drive at this path
//! let cdrom = Device::open("/dev/cdrom")?;
//! // Or get the first one available
//! let cdrom_path = cd_drives().next().unwrap();
//! let cdrom = Device::open(&cdrom_path)?;
//! // Open the tray
//! cdrom.eject()?;
//! # eject::error::Result::Ok(())
//! ```