pub struct ObjectInfo<'a> {Show 19 fields
pub storage_id: u32,
pub object_format: u16,
pub protection_status: u16,
pub object_compressed_size: u32,
pub thumb_format: u16,
pub thumb_compressed_size: u32,
pub thumb_pix_width: u32,
pub thumb_pix_height: u32,
pub image_pix_width: u32,
pub image_pix_height: u32,
pub image_bit_depth: u32,
pub parent_object: u32,
pub association_type: u16,
pub association_desc: u32,
pub sequence_number: u32,
pub filename: &'a str,
pub capture_date: &'a str,
pub modification_date: &'a str,
pub keywords: &'a str,
}Expand description
MTP ObjectInfo dataset used by op::GET_OBJECT_INFO and op::SEND_OBJECT_INFO.
Fields§
§storage_id: u32Storage ID containing this object.
object_format: u16Object format code (see format).
protection_status: u16Protection status (0 = none, 1 = read-only).
object_compressed_size: u32Size of the object in bytes (0xFFFF_FFFF if >= 4 GiB).
thumb_format: u16Thumbnail format (0 if no thumbnail).
thumb_compressed_size: u32Thumbnail compressed size in bytes.
thumb_pix_width: u32Thumbnail width in pixels.
thumb_pix_height: u32Thumbnail height in pixels.
image_pix_width: u32Image width in pixels.
image_pix_height: u32Image height in pixels.
image_bit_depth: u32Image bit depth.
parent_object: u32Parent association handle (0 = root).
association_type: u16Association type (see assoc).
association_desc: u32Association description.
sequence_number: u32Sequence number.
filename: &'a strFile or folder name.
capture_date: &'a strCapture date string (YYYYMMDDThhmmss).
modification_date: &'a strModification date string (YYYYMMDDThhmmss).
keywords: &'a strKeywords string.
Implementations§
Source§impl<'a> ObjectInfo<'a>
impl<'a> ObjectInfo<'a>
Sourcepub const fn file(
storage_id: u32,
parent_object: u32,
object_format: u16,
size: u32,
filename: &'a str,
) -> Self
pub const fn file( storage_id: u32, parent_object: u32, object_format: u16, size: u32, filename: &'a str, ) -> Self
Creates an ObjectInfo for a file in storage_id under parent_object.
Sourcepub const fn folder(
storage_id: u32,
parent_object: u32,
filename: &'a str,
) -> Self
pub const fn folder( storage_id: u32, parent_object: u32, filename: &'a str, ) -> Self
Creates an ObjectInfo for a folder (format::ASSOCIATION, assoc::GENERIC_FOLDER).
Sourcepub fn write_to(&self, writer: &mut MtpWriter<'_>) -> Result<(), MtpError>
pub fn write_to(&self, writer: &mut MtpWriter<'_>) -> Result<(), MtpError>
Serializes the ObjectInfo dataset using writer.