pub struct CollectionBuilder { /* private fields */ }
Expand description
Builder for creating Collection instances
Implementations§
Source§impl CollectionBuilder
impl CollectionBuilder
Sourcepub fn new(id: Option<CollectionId>, name: String) -> Self
pub fn new(id: Option<CollectionId>, name: String) -> Self
Create a new CollectionBuilder with required fields
Sourcepub fn new_collection(name: impl Into<String>) -> Self
pub fn new_collection(name: impl Into<String>) -> Self
Create a new CollectionBuilder for creating a new collection (ID will be assigned by server)
pub fn description<S: Into<String>>(self, desc: S) -> Self
pub fn color<S: Into<String>>(self, color: S) -> Self
pub fn parent_id(self, id: i32) -> Self
pub fn personal_owner_id(self, id: i64) -> Self
pub fn namespace<S: Into<String>>(self, ns: S) -> Self
pub fn slug<S: Into<String>>(self, slug: S) -> Self
pub fn archived(self, archived: bool) -> Self
pub fn can_write(self, can_write: bool) -> Self
pub fn created_at(self, dt: DateTime<Utc>) -> Self
pub fn updated_at(self, dt: DateTime<Utc>) -> Self
pub fn collection_position(self, position: i32) -> Self
Sourcepub fn build(self) -> Collection
pub fn build(self) -> Collection
Build the Collection instance
Auto Trait Implementations§
impl Freeze for CollectionBuilder
impl RefUnwindSafe for CollectionBuilder
impl Send for CollectionBuilder
impl Sync for CollectionBuilder
impl Unpin for CollectionBuilder
impl UnwindSafe for CollectionBuilder
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