pub struct Folder<'a> { /* private fields */ }
Implementations§
Trait Implementations§
Source§impl Object for &Folder<'_>
impl Object for &Folder<'_>
Source§fn device(&self) -> &MtpDevice
fn device(&self) -> &MtpDevice
Must return a valid reference of an
MtpDevice
, where this object resides in.Source§fn get_string(&self, property: Property) -> Result<String>
fn get_string(&self, property: Property) -> Result<String>
Retrieves a string from an object attribute.
Source§fn set_string(&self, property: Property, string: &str) -> Result<()>
fn set_string(&self, property: Property, string: &str) -> Result<()>
Sets an object attribute from a string.
Source§fn get_u64(&self, property: Property) -> Result<u64>
fn get_u64(&self, property: Property) -> Result<u64>
Retrieves an
u64
from an object attribute.Source§fn get_u32(&self, property: Property) -> Result<u32>
fn get_u32(&self, property: Property) -> Result<u32>
Retrieves an
u32
from an object attribute, returns the value of default
on failure.Source§fn set_u32(&self, property: Property, value: u32) -> Result<()>
fn set_u32(&self, property: Property, value: u32) -> Result<()>
Sets an object attribute from an
u32
.Source§fn get_u16(&self, property: Property) -> Result<u16>
fn get_u16(&self, property: Property) -> Result<u16>
Retrieves an
u16
from an object attribute, returns the value of default
on failure.Source§fn set_u16(&self, property: Property, value: u16) -> Result<()>
fn set_u16(&self, property: Property, value: u16) -> Result<()>
Sets an object attribute from an
u16
.Source§fn get_u8(&self, property: Property) -> Result<u8>
fn get_u8(&self, property: Property) -> Result<u8>
Retrieves an
u8
from an object attribute, returns the value of default
on failure.Source§fn set_u8(&self, property: Property, value: u8) -> Result<()>
fn set_u8(&self, property: Property, value: u8) -> Result<()>
Sets an object attribute from an
u8
.Source§fn delete(&self) -> Result<()>
fn delete(&self) -> Result<()>
Deletes a single file, track, playlist, folder or any other object off the MTP device.
Note that deleting folders may no be remove its contents, in turn this is the expected
behavior. Read more
Source§fn move_to(&self, storage_id: u32, parent: Parent) -> Result<()>
fn move_to(&self, storage_id: u32, parent: Parent) -> Result<()>
Moves the object to the specified storage (by its id) and parent folder. Moving objects
may or not be supported on the device. Read more
Source§fn copy_to(&self, storage_id: u32, parent: Parent) -> Result<()>
fn copy_to(&self, storage_id: u32, parent: Parent) -> Result<()>
Copies the object to the specified storage (by its id) and parent folder. Copying objects
may or not be supported on the device. Read more
Source§impl Object for Folder<'_>
impl Object for Folder<'_>
Source§fn device(&self) -> &MtpDevice
fn device(&self) -> &MtpDevice
Must return a valid reference of an
MtpDevice
, where this object resides in.Source§fn get_string(&self, property: Property) -> Result<String>
fn get_string(&self, property: Property) -> Result<String>
Retrieves a string from an object attribute.
Source§fn set_string(&self, property: Property, string: &str) -> Result<()>
fn set_string(&self, property: Property, string: &str) -> Result<()>
Sets an object attribute from a string.
Source§fn get_u64(&self, property: Property) -> Result<u64>
fn get_u64(&self, property: Property) -> Result<u64>
Retrieves an
u64
from an object attribute.Source§fn get_u32(&self, property: Property) -> Result<u32>
fn get_u32(&self, property: Property) -> Result<u32>
Retrieves an
u32
from an object attribute, returns the value of default
on failure.Source§fn set_u32(&self, property: Property, value: u32) -> Result<()>
fn set_u32(&self, property: Property, value: u32) -> Result<()>
Sets an object attribute from an
u32
.Source§fn get_u16(&self, property: Property) -> Result<u16>
fn get_u16(&self, property: Property) -> Result<u16>
Retrieves an
u16
from an object attribute, returns the value of default
on failure.Source§fn set_u16(&self, property: Property, value: u16) -> Result<()>
fn set_u16(&self, property: Property, value: u16) -> Result<()>
Sets an object attribute from an
u16
.Source§fn get_u8(&self, property: Property) -> Result<u8>
fn get_u8(&self, property: Property) -> Result<u8>
Retrieves an
u8
from an object attribute, returns the value of default
on failure.Source§fn set_u8(&self, property: Property, value: u8) -> Result<()>
fn set_u8(&self, property: Property, value: u8) -> Result<()>
Sets an object attribute from an
u8
.Source§fn delete(&self) -> Result<()>
fn delete(&self) -> Result<()>
Deletes a single file, track, playlist, folder or any other object off the MTP device.
Note that deleting folders may no be remove its contents, in turn this is the expected
behavior. Read more
Source§fn move_to(&self, storage_id: u32, parent: Parent) -> Result<()>
fn move_to(&self, storage_id: u32, parent: Parent) -> Result<()>
Moves the object to the specified storage (by its id) and parent folder. Moving objects
may or not be supported on the device. Read more
Source§fn copy_to(&self, storage_id: u32, parent: Parent) -> Result<()>
fn copy_to(&self, storage_id: u32, parent: Parent) -> Result<()>
Copies the object to the specified storage (by its id) and parent folder. Copying objects
may or not be supported on the device. Read more
Auto Trait Implementations§
impl<'a> Freeze for Folder<'a>
impl<'a> RefUnwindSafe for Folder<'a>
impl<'a> !Send for Folder<'a>
impl<'a> !Sync for Folder<'a>
impl<'a> Unpin for Folder<'a>
impl<'a> UnwindSafe for Folder<'a>
Blanket Implementations§
Source§impl<T> AsObjectId for Twhere
T: Object,
impl<T> AsObjectId for Twhere
T: Object,
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