pub struct ObjectHandle(pub u64);Expand description
Opaque handle for an object on a device.
The inner value is a backend-defined token, meaningful only within a single open device session
— not a stable, cross-session, or wire-level identifier. The USB/PTP backend uses the raw PTP
object handle; the WPD backend maps the token to an opaque WPD object-ID string. Treat it as
opaque: pass it back to the same open device, don’t persist it across sessions, and don’t derive
meaning from its numeric value. (Some devices, notably Android, re-key handles even within a
session — see crate::Error::StaleHandle.)
Tuple Fields§
§0: u64Implementations§
Trait Implementations§
Source§impl Clone for ObjectHandle
impl Clone for ObjectHandle
Source§fn clone(&self) -> ObjectHandle
fn clone(&self) -> ObjectHandle
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 ObjectHandle
Source§impl Debug for ObjectHandle
impl Debug for ObjectHandle
Source§impl Default for ObjectHandle
impl Default for ObjectHandle
Source§fn default() -> ObjectHandle
fn default() -> ObjectHandle
Returns the “default value” for a type. Read more
impl Eq for ObjectHandle
Source§impl From<ObjectHandle> for ObjectHandle
impl From<ObjectHandle> for ObjectHandle
Source§fn from(h: PtpObjectHandle) -> Self
fn from(h: PtpObjectHandle) -> Self
Converts to this type from the input type.
Source§impl Hash for ObjectHandle
impl Hash for ObjectHandle
Source§impl PartialEq for ObjectHandle
impl PartialEq for ObjectHandle
Source§fn eq(&self, other: &ObjectHandle) -> bool
fn eq(&self, other: &ObjectHandle) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ObjectHandle
Auto Trait Implementations§
impl Freeze for ObjectHandle
impl RefUnwindSafe for ObjectHandle
impl Send for ObjectHandle
impl Sync for ObjectHandle
impl Unpin for ObjectHandle
impl UnsafeUnpin for ObjectHandle
impl UnwindSafe for ObjectHandle
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