pub struct Collection {
pub client: Option<Client>,
pub alias: String,
pub title: String,
pub description: Option<String>,
pub style_sheet: Option<String>,
pub public: bool,
pub views: Option<u64>,
pub verification_link: Option<String>,
pub total_posts: Option<u64>,
}Expand description
A struct describing a single Collection entity
Fields§
§client: Option<Client>§alias: String§title: String§description: Option<String>§style_sheet: Option<String>§public: bool§views: Option<u64>§verification_link: Option<String>§total_posts: Option<u64>Implementations§
Source§impl Collection
impl Collection
Sourcepub fn build_update(&self) -> CollectionUpdateBuilder
pub fn build_update(&self) -> CollectionUpdateBuilder
Creates a CollectionUpdateBuilder with defaults set
Sourcepub async fn update(
&self,
update: CollectionUpdate,
) -> Result<Collection, ApiError>
pub async fn update( &self, update: CollectionUpdate, ) -> Result<Collection, ApiError>
Updates a collection from an existing CollectionUpdate
Sourcepub async fn get_posts(&self) -> Result<Vec<Post>, ApiError>
pub async fn get_posts(&self) -> Result<Vec<Post>, ApiError>
Returns all Posts belonging to this collection
Sourcepub async fn get_post(&self, slug: String) -> Result<Post, ApiError>
pub async fn get_post(&self, slug: String) -> Result<Post, ApiError>
Returns a single Post belonging to this collection
Sourcepub async fn take_posts(
&self,
posts: &[MovePost],
) -> Result<Vec<Result<MoveResult, MoveResult>>, ApiError>
pub async fn take_posts( &self, posts: &[MovePost], ) -> Result<Vec<Result<MoveResult, MoveResult>>, ApiError>
Moves a set of Posts into this 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