pub struct Folder {
pub base: EntryBase,
pub folder_id: u64,
pub contents: Option<Vec<Entry>>,
}
Expand description
A structure representing a folder in pCloud.
Fields§
§base: EntryBase
Metadata common to all entries in pCloud.
folder_id: u64
The unique folder ID.
contents: Option<Vec<Entry>>
A list of contents inside the folder (files and subfolders).
Implementations§
Source§impl Folder
impl Folder
Sourcepub fn find_entry(&self, name: &str) -> Option<&Entry>
pub fn find_entry(&self, name: &str) -> Option<&Entry>
Finds an entry (file or folder) by its name inside the folder.
§Arguments
name
- The name of the entry to search for.
§Returns
An optional reference to the entry if it exists in the folder.
§Examples
if let Some(entry) = folder.find_entry("example.txt") {
println!("Found entry: {:?}", entry.base().name);
}
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Folder
impl<'de> Deserialize<'de> for Folder
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for Folder
impl Ord for Folder
Source§impl PartialOrd for Folder
impl PartialOrd for Folder
impl Eq for Folder
Auto Trait Implementations§
impl Freeze for Folder
impl RefUnwindSafe for Folder
impl Send for Folder
impl Sync for Folder
impl Unpin for Folder
impl UnwindSafe for Folder
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