Skip to main content

Module device

Module device 

Source
Expand description

Opening (and reopening) the MTP device behind the mount.

The filesystem never opens a device itself: it asks a DeviceOpener. That keeps the reconnect path honest (the same code opens the device the first time and after a cable glitch) and lets tests hand the mount a device they can make vanish.

Structs§

UnplugSwitch
A pretend USB cable, shared between the mount and whoever wants to yank it.
UsbOpener
Opens a USB MTP device by serial number.

Traits§

DeviceOpener
Source of MTP devices for a mount.

Functions§

is_link_lost
Whether an error means “this session is gone”, as opposed to a normal operation failure the caller should see.