pub struct ItemLocation<'a> { /* private fields */ }
Expand description
Reference to a DriveItem
in a drive.
It does not contains the drive information.
§See also
Implementations§
Source§impl<'a> ItemLocation<'a>
impl<'a> ItemLocation<'a>
Sourcepub fn from_path(path: &'a str) -> Option<Self>
pub fn from_path(path: &'a str) -> Option<Self>
A UNIX-like /
-started absolute path to a file or directory in the drive.
§Error
If path
contains invalid characters for OneDrive API, it returns None.
§Note
The trailing /
is optional.
Special name on Windows like CON
or NUL
is tested to be permitted in API,
but may still cause errors on Windows or OneDrive Online.
These names will pass the check, but STRONGLY NOT recommended.
§See also
Sourcepub fn child_of_id(parent_id: &'a ItemId, child_name: &'a FileName) -> Self
pub fn child_of_id(parent_id: &'a ItemId, child_name: &'a FileName) -> Self
The child item in a directory.
Trait Implementations§
Source§impl<'a> Clone for ItemLocation<'a>
impl<'a> Clone for ItemLocation<'a>
Source§fn clone(&self) -> ItemLocation<'a>
fn clone(&self) -> ItemLocation<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a> Debug for ItemLocation<'a>
impl<'a> Debug for ItemLocation<'a>
Source§impl<'a> From<&'a ItemId> for ItemLocation<'a>
impl<'a> From<&'a ItemId> for ItemLocation<'a>
impl<'a> Copy for ItemLocation<'a>
Auto Trait Implementations§
impl<'a> Freeze for ItemLocation<'a>
impl<'a> RefUnwindSafe for ItemLocation<'a>
impl<'a> Send for ItemLocation<'a>
impl<'a> Sync for ItemLocation<'a>
impl<'a> Unpin for ItemLocation<'a>
impl<'a> UnwindSafe for ItemLocation<'a>
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