pub struct Collection {Show 14 fields
pub id: Option<CollectionId>,
pub name: String,
pub description: Option<String>,
pub color: Option<String>,
pub parent_id: Option<i32>,
pub personal_owner_id: Option<i64>,
pub namespace: Option<String>,
pub slug: Option<String>,
pub archived: Option<bool>,
pub can_write: Option<bool>,
pub created_at: Option<DateTime<Utc>>,
pub updated_at: Option<DateTime<Utc>>,
pub authority_level: Option<String>,
pub collection_position: Option<i32>,
}
Expand description
Represents a Metabase Collection
Fields§
§id: Option<CollectionId>
§name: String
§description: Option<String>
§color: Option<String>
§parent_id: Option<i32>
§personal_owner_id: Option<i64>
§namespace: Option<String>
§slug: Option<String>
§archived: Option<bool>
§can_write: Option<bool>
§created_at: Option<DateTime<Utc>>
§updated_at: Option<DateTime<Utc>>
§collection_position: Option<i32>
Implementations§
Source§impl Collection
impl Collection
Sourcepub fn new(id: Option<CollectionId>, name: String) -> Self
pub fn new(id: Option<CollectionId>, name: String) -> Self
Create a new Collection with minimal required fields
pub fn id(&self) -> Option<CollectionId>
pub fn name(&self) -> &str
pub fn description(&self) -> Option<&str>
pub fn color(&self) -> Option<&str>
pub fn parent_id(&self) -> Option<i32>
pub fn personal_owner_id(&self) -> Option<i64>
pub fn namespace(&self) -> Option<&str>
pub fn slug(&self) -> Option<&str>
pub fn archived(&self) -> Option<bool>
pub fn can_write(&self) -> Option<bool>
pub fn collection_position(&self) -> Option<i32>
Sourcepub fn is_personal(&self) -> bool
pub fn is_personal(&self) -> bool
Check if this is a personal collection
Trait Implementations§
Source§impl Clone for Collection
impl Clone for Collection
Source§fn clone(&self) -> Collection
fn clone(&self) -> Collection
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 Debug for Collection
impl Debug for Collection
Source§impl<'de> Deserialize<'de> for Collection
impl<'de> Deserialize<'de> for Collection
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
Auto Trait Implementations§
impl Freeze for Collection
impl RefUnwindSafe for Collection
impl Send for Collection
impl Sync for Collection
impl Unpin for Collection
impl UnwindSafe for Collection
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