pub struct Capabilities {
pub can_upload: bool,
pub can_delete: bool,
pub can_rename: bool,
pub can_move: bool,
pub can_copy: bool,
pub can_create_folder: bool,
pub supports_partial_download: bool,
pub supports_thumbnails: bool,
pub supports_events: bool,
}Expand description
What a connected device supports, derived per backend.
Replaces switching on backend-specific operation codes. The USB/PTP backend computes these from
the device’s advertised operations; the WPD backend computes them from WPD command support.
Advertised support can still be wrong on some devices (see the Fujifilm quirk in AGENTS.md),
so treat these as a strong hint, not a guarantee.
Fields§
§can_upload: boolCan create new files (upload).
can_delete: boolCan delete objects.
can_rename: boolCan rename objects.
can_move: boolCan move objects between folders/storages.
can_copy: boolCan copy objects.
can_create_folder: boolCan create folders.
supports_partial_download: boolCan download a byte range / resume (not just whole files).
supports_thumbnails: boolCan fetch thumbnails.
supports_events: boolEmits device events.
Trait Implementations§
Source§impl Clone for Capabilities
impl Clone for Capabilities
Source§fn clone(&self) -> Capabilities
fn clone(&self) -> Capabilities
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for Capabilities
Source§impl Debug for Capabilities
impl Debug for Capabilities
Source§impl Default for Capabilities
impl Default for Capabilities
Source§fn default() -> Capabilities
fn default() -> Capabilities
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for Capabilities
impl RefUnwindSafe for Capabilities
impl Send for Capabilities
impl Sync for Capabilities
impl Unpin for Capabilities
impl UnsafeUnpin for Capabilities
impl UnwindSafe for Capabilities
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