pub struct ServerThumbnailFormat { /* private fields */ }Expand description
Represents details of the server thumbnail image format.
Any image with a source starting with /user_uploads/thumbnail/ can have its last path component replaced with any of the names contained in this list, to obtain the desired thumbnail size. Changes: New in Zulip 9.0 (feature level 273). #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
Modified from openapi-generator-cli output:
$ openapi-generator-cli generate -g rust -i ./zerver/openapi/zulip.yaml -o zulip-openapi --skip-validate-spec/*
* Zulip REST API
*
* Powerful open source group chat
*
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://openapi-generator.tech
*/See zerver/openapi/zulip.yaml for the original OpenAPI configuration.
Configuration slightly modified to work with the Rust generator of openapi-generator-cli.
Implementations§
Source§impl ServerThumbnailFormat
impl ServerThumbnailFormat
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Creates a new ServerThumbnailFormat.
Source§impl ServerThumbnailFormat
impl ServerThumbnailFormat
Sourcepub fn name(&self) -> Option<&str>
pub fn name(&self) -> Option<&str>
Gets the ServerThumbnailFormat name.
The file path component of the thumbnail format.
Sourcepub fn set_name<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
pub fn set_name<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
Sets the ServerThumbnailFormat name.
The file path component of the thumbnail format.
Sourcepub fn unset_name(&mut self) -> Option<String>
pub fn unset_name(&mut self) -> Option<String>
Unsets the ServerThumbnailFormat name.
The file path component of the thumbnail format.
Sourcepub fn with_name<'a, C: Into<Cow<'a, str>>>(self, val: C) -> Self
pub fn with_name<'a, C: Into<Cow<'a, str>>>(self, val: C) -> Self
Builder function that sets the ServerThumbnailFormat name.
The file path component of the thumbnail format.
Sourcepub fn format(&self) -> Option<&str>
pub fn format(&self) -> Option<&str>
Gets the ServerThumbnailFormat format.
The extension of this format.
Sourcepub fn set_format<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
pub fn set_format<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
Sets the ServerThumbnailFormat format.
The extension of this format.
Sourcepub fn unset_format(&mut self) -> Option<String>
pub fn unset_format(&mut self) -> Option<String>
Unsets the ServerThumbnailFormat format.
The extension of this format.
Sourcepub fn with_format<'a, C: Into<Cow<'a, str>>>(self, val: C) -> Self
pub fn with_format<'a, C: Into<Cow<'a, str>>>(self, val: C) -> Self
Builder function that sets the ServerThumbnailFormat format.
The extension of this format.
Source§impl ServerThumbnailFormat
impl ServerThumbnailFormat
Sourcepub const fn max_width(&self) -> Option<u64>
pub const fn max_width(&self) -> Option<u64>
Gets the ServerThumbnailFormat max_width.
The maximum width of this format.
Sourcepub fn set_max_width(&mut self, val: u64)
pub fn set_max_width(&mut self, val: u64)
Sets the ServerThumbnailFormat max_width.
The maximum width of this format.
Sourcepub fn unset_max_width(&mut self) -> Option<u64>
pub fn unset_max_width(&mut self) -> Option<u64>
Unsets the ServerThumbnailFormat max_width.
The maximum width of this format.
Sourcepub fn with_max_width(self, val: u64) -> Self
pub fn with_max_width(self, val: u64) -> Self
Builder function that sets the ServerThumbnailFormat max_width.
The maximum width of this format.
Sourcepub const fn max_height(&self) -> Option<u64>
pub const fn max_height(&self) -> Option<u64>
Gets the ServerThumbnailFormat max_height.
The maximum height of this format.
Sourcepub fn set_max_height(&mut self, val: u64)
pub fn set_max_height(&mut self, val: u64)
Sets the ServerThumbnailFormat max_height.
The maximum height of this format.
Sourcepub fn unset_max_height(&mut self) -> Option<u64>
pub fn unset_max_height(&mut self) -> Option<u64>
Unsets the ServerThumbnailFormat max_height.
The maximum height of this format.
Sourcepub fn with_max_height(self, val: u64) -> Self
pub fn with_max_height(self, val: u64) -> Self
Builder function that sets the ServerThumbnailFormat max_height.
The maximum height of this format.
Sourcepub const fn animated(&self) -> Option<bool>
pub const fn animated(&self) -> Option<bool>
Gets the ServerThumbnailFormat animated.
If this file format is animated.
These formats are only generated for uploaded imates which themselves are animated.
Sourcepub fn set_animated(&mut self, val: bool)
pub fn set_animated(&mut self, val: bool)
Sets the ServerThumbnailFormat animated.
If this file format is animated.
These formats are only generated for uploaded imates which themselves are animated.
Sourcepub fn unset_animated(&mut self) -> Option<bool>
pub fn unset_animated(&mut self) -> Option<bool>
Unsets the ServerThumbnailFormat animated.
If this file format is animated.
These formats are only generated for uploaded imates which themselves are animated.
Sourcepub fn with_animated(self, val: bool) -> Self
pub fn with_animated(self, val: bool) -> Self
Builder function that sets the ServerThumbnailFormat animated.
If this file format is animated.
These formats are only generated for uploaded imates which themselves are animated.