pub struct ObjectFormat(pub u16);Expand description
Object format, as the MTP format code the device reports.
Kept as the raw 16-bit MTP format code (WPD exposes the same codes), with category helpers so
callers don’t switch on a backend-specific enum. Use ObjectFormat::is_association for the
folder marker, or ObjectInfo::is_folder for the full folder test.
Tuple Fields§
§0: u16Implementations§
Source§impl ObjectFormat
impl ObjectFormat
Sourcepub const ASSOCIATION: Self
pub const ASSOCIATION: Self
Association (a folder).
Sourcepub fn is_association(self) -> bool
pub fn is_association(self) -> bool
Whether this is the association (folder) format.
Trait Implementations§
Source§impl Clone for ObjectFormat
impl Clone for ObjectFormat
Source§fn clone(&self) -> ObjectFormat
fn clone(&self) -> ObjectFormat
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 ObjectFormat
Source§impl Debug for ObjectFormat
impl Debug for ObjectFormat
Source§impl Default for ObjectFormat
impl Default for ObjectFormat
impl Eq for ObjectFormat
Source§impl From<ObjectFormatCode> for ObjectFormat
impl From<ObjectFormatCode> for ObjectFormat
Source§fn from(c: ObjectFormatCode) -> Self
fn from(c: ObjectFormatCode) -> Self
Converts to this type from the input type.
Source§impl Hash for ObjectFormat
impl Hash for ObjectFormat
Source§impl PartialEq for ObjectFormat
impl PartialEq for ObjectFormat
Source§fn eq(&self, other: &ObjectFormat) -> bool
fn eq(&self, other: &ObjectFormat) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ObjectFormat
Auto Trait Implementations§
impl Freeze for ObjectFormat
impl RefUnwindSafe for ObjectFormat
impl Send for ObjectFormat
impl Sync for ObjectFormat
impl Unpin for ObjectFormat
impl UnsafeUnpin for ObjectFormat
impl UnwindSafe for ObjectFormat
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