Struct playdate_device::mount::MountedDevice
source · pub struct MountedDevice {
pub device: Device,
pub handle: MountHandle,
}Fields§
§device: Device§handle: MountHandleImplementations§
source§impl MountedDevice
impl MountedDevice
pub fn new(device: Device, handle: MountHandle) -> Self
Methods from Deref<Target = Device>§
sourcepub fn refresh(&mut self) -> Result<bool, Error>
pub fn refresh(&mut self) -> Result<bool, Error>
- Find this device
- Compare
modeofthisvs. just found - [if changed] Update state of
this, drop all pending transfers if needed to prevent future errors when send to unexisting interface. - Return
trueifmodechanged.
sourcepub fn open(&mut self) -> Result<(), Error>
pub fn open(&mut self) -> Result<(), Error>
Open USB interface if available, otherwise try open serial port if available.
pub fn interface_mut(&mut self) -> Result<&mut Interface, Error>
pub fn set_interface(&mut self, interface: Interface)
pub fn close(&mut self)
pub fn close_with_reset(&mut self)
pub fn info(&self) -> &DeviceInfo
sourcepub fn mode_cached(&self) -> Mode
pub fn mode_cached(&self) -> Mode
Cached mode of this device
pub fn is_open(&self) -> bool
pub fn is_ready(&self) -> bool
Trait Implementations§
source§impl Deref for MountedDevice
impl Deref for MountedDevice
source§impl DerefMut for MountedDevice
impl DerefMut for MountedDevice
source§impl Unmount for MountedDevice
impl Unmount for MountedDevice
source§impl UnmountAsync for MountedDevicewhere
Volume: UnmountAsync,
impl UnmountAsync for MountedDevicewhere
Volume: UnmountAsync,
Auto Trait Implementations§
impl !Freeze for MountedDevice
impl !RefUnwindSafe for MountedDevice
impl Send for MountedDevice
impl Sync for MountedDevice
impl Unpin for MountedDevice
impl !UnwindSafe for MountedDevice
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 384 bytes