LIBMTP_mtpdevice_struct

Struct LIBMTP_mtpdevice_struct 

Source
#[repr(C)]
pub struct LIBMTP_mtpdevice_struct {
Show 18 fields pub object_bitsize: u8, pub params: *mut c_void, pub usbinfo: *mut c_void, pub storage: *mut LIBMTP_devicestorage_t, pub errorstack: *mut LIBMTP_error_t, pub maximum_battery_level: u8, pub default_music_folder: u32, pub default_playlist_folder: u32, pub default_picture_folder: u32, pub default_video_folder: u32, pub default_organizer_folder: u32, pub default_zencast_folder: u32, pub default_album_folder: u32, pub default_text_folder: u32, pub cd: *mut c_void, pub extensions: *mut LIBMTP_device_extension_t, pub cached: c_int, pub next: *mut LIBMTP_mtpdevice_t,
}
Expand description

Main MTP device object struct

Fields§

§object_bitsize: u8

Object bitsize, typically 32 or 64.

§params: *mut c_void

Parameters for this device, must be cast into \c (PTPParams*) before internal use.

§usbinfo: *mut c_void

USB device for this device, must be cast into \c (PTP_USB*) before internal use.

§storage: *mut LIBMTP_devicestorage_t

The storage for this device, do not use strings in here without copying them first, and beware that this list may be rebuilt at any time. @see LIBMTP_Get_Storage()

§errorstack: *mut LIBMTP_error_t

The error stack. This shall be handled using the error getting and clearing functions, not by dereferencing this list.

§maximum_battery_level: u8

The maximum battery level for this device

§default_music_folder: u32

Default music folder

§default_playlist_folder: u32

Default playlist folder

§default_picture_folder: u32

Default picture folder

§default_video_folder: u32

Default video folder

§default_organizer_folder: u32

Default organizer folder

§default_zencast_folder: u32

Default ZENcast folder (only Creative devices…)

§default_album_folder: u32

Default Album folder

§default_text_folder: u32

Default Text folder

§cd: *mut c_void

Per device iconv() converters, only used internally

§extensions: *mut LIBMTP_device_extension_t

Extension list

§cached: c_int

Whether the device uses caching, only used internally

§next: *mut LIBMTP_mtpdevice_t

Pointer to next device in linked list; NULL if this is the last device

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.