pub struct Folder {
pub id: FolderId,
pub grant_id: GrantId,
pub name: String,
pub parent_id: Option<String>,
pub child_count: Option<i32>,
pub unread_count: Option<i32>,
pub total_count: Option<i32>,
pub system_folder: Option<bool>,
pub background_color: Option<String>,
pub text_color: Option<String>,
}Expand description
A folder or label.
Represents email folders (IMAP) or labels (Gmail). In Nylas API v3, these are unified into a single resource.
§Example
let folder = Folder {
id: FolderId::new("folder_123"),
grant_id: GrantId::new("grant_456"),
name: "Important".to_string(),
parent_id: None,
child_count: Some(0),
unread_count: Some(5),
total_count: Some(42),
system_folder: Some(false),
background_color: None,
text_color: None,
};Fields§
§id: FolderIdUnique identifier for the folder.
grant_id: GrantIdGrant ID this folder belongs to.
name: StringName of the folder.
parent_id: Option<String>Parent folder ID (for nested folders).
child_count: Option<i32>Number of child folders.
unread_count: Option<i32>Number of unread messages in this folder.
total_count: Option<i32>Total number of messages in this folder.
system_folder: Option<bool>Whether this is a system folder (Inbox, Sent, Trash, etc.).
background_color: Option<String>Background color (Gmail labels only).
text_color: Option<String>Text color (Gmail labels only).
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
impl Eq for Folder
impl StructuralPartialEq 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