pub struct ImageUpdateRequest {
pub name: Option<String>,
pub description: Option<String>,
pub is_premium: Option<bool>,
pub publish_at: Option<Option<Publish>>,
pub styles: Option<Vec<ImageStyleId>>,
pub age_ranges: Option<Vec<AgeRangeId>>,
pub affiliations: Option<Vec<AffiliationId>>,
pub categories: Option<Vec<CategoryId>>,
pub tags: Option<Vec<ImageTagIndex>>,
}
Expand description
Request to update an image.
All fields are optional, any field that is None
will not be updated.
Fields§
§name: Option<String>
If Some
change the image’s name to this name.
description: Option<String>
If Some
change the image’s description to this description.
If Some
mark the image as premium or not.
publish_at: Option<Option<Publish>>
If Some
, change the publish_at
to the given Option<Publish>
.
Specifically, if None
, don’t update.
If Some(None)
, set the publish_at
to None
, unpublishing it if previously published.
Otherwise set it to the given Publish
.
styles: Option<Vec<ImageStyleId>>
If Some
replace the image’s styles with these.
age_ranges: Option<Vec<AgeRangeId>>
If Some
replace the image’s age ranges with these.
affiliations: Option<Vec<AffiliationId>>
If Some
replace the image’s affiliations with these.
categories: Option<Vec<CategoryId>>
If Some
replace the image’s categories with these.
If Some
replace the image’s tags with these.
Trait Implementations§
Source§impl Debug for ImageUpdateRequest
impl Debug for ImageUpdateRequest
Source§impl Default for ImageUpdateRequest
impl Default for ImageUpdateRequest
Source§fn default() -> ImageUpdateRequest
fn default() -> ImageUpdateRequest
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ImageUpdateRequest
impl<'de> Deserialize<'de> for ImageUpdateRequest
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 ImageUpdateRequest
impl RefUnwindSafe for ImageUpdateRequest
impl Send for ImageUpdateRequest
impl Sync for ImageUpdateRequest
impl Unpin for ImageUpdateRequest
impl UnwindSafe for ImageUpdateRequest
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