shared::domain::image

Struct ImageUpdateRequest

Source
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.

§is_premium: Option<bool>

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.

§tags: Option<Vec<ImageTagIndex>>

If Some replace the image’s tags with these.

Trait Implementations§

Source§

impl Debug for ImageUpdateRequest

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ImageUpdateRequest

Source§

fn default() -> ImageUpdateRequest

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for ImageUpdateRequest

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for ImageUpdateRequest

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T