pub struct SlackFile {Show 17 fields
pub id: SlackFileId,
pub created: Option<SlackDateTime>,
pub timestamp: Option<SlackDateTime>,
pub name: Option<String>,
pub title: Option<String>,
pub mimetype: Option<SlackMimeType>,
pub filetype: Option<SlackFileType>,
pub pretty_type: Option<SlackFilePrettyType>,
pub external_type: Option<SlackFileExternalType>,
pub user: Option<SlackUserId>,
pub username: Option<String>,
pub url_private: Option<Url>,
pub url_private_download: Option<Url>,
pub permalink: Option<Url>,
pub permalink_public: Option<Url>,
pub reactions: Option<Vec<SlackReaction>>,
pub flags: SlackFileFlags,
}Fields§
§id: SlackFileId§created: Option<SlackDateTime>§timestamp: Option<SlackDateTime>§name: Option<String>§title: Option<String>§mimetype: Option<SlackMimeType>§filetype: Option<SlackFileType>§pretty_type: Option<SlackFilePrettyType>§external_type: Option<SlackFileExternalType>§user: Option<SlackUserId>§username: Option<String>§url_private: Option<Url>§url_private_download: Option<Url>§permalink: Option<Url>§permalink_public: Option<Url>§reactions: Option<Vec<SlackReaction>>§flags: SlackFileFlagsImplementations§
Source§impl SlackFile
impl SlackFile
Sourcepub fn new(id: SlackFileId, flags: SlackFileFlags) -> Self
pub fn new(id: SlackFileId, flags: SlackFileFlags) -> Self
Creates a new SlackFile from its required fields. Option fields start as None, and fields with #[default] take their default.
Sourcepub fn id(&mut self, value: SlackFileId) -> &mut Self
pub fn id(&mut self, value: SlackFileId) -> &mut Self
Sets id to value.
Sourcepub fn with_id(self, value: SlackFileId) -> Self
pub fn with_id(self, value: SlackFileId) -> Self
Returns self with id set to value.
Sourcepub fn created(&mut self, value: SlackDateTime) -> &mut Self
pub fn created(&mut self, value: SlackDateTime) -> &mut Self
Sets created to Some(value).
Sourcepub fn reset_created(&mut self) -> &mut Self
pub fn reset_created(&mut self) -> &mut Self
Sets created to None.
Sourcepub fn mopt_created(&mut self, value: Option<SlackDateTime>) -> &mut Self
pub fn mopt_created(&mut self, value: Option<SlackDateTime>) -> &mut Self
Sets created to the given Option.
Sourcepub fn with_created(self, value: SlackDateTime) -> Self
pub fn with_created(self, value: SlackDateTime) -> Self
Returns self with created set to Some(value).
Sourcepub fn without_created(self) -> Self
pub fn without_created(self) -> Self
Returns self with created set to None.
Sourcepub fn opt_created(self, value: Option<SlackDateTime>) -> Self
pub fn opt_created(self, value: Option<SlackDateTime>) -> Self
Returns self with created set to the given Option.
Sourcepub fn timestamp(&mut self, value: SlackDateTime) -> &mut Self
pub fn timestamp(&mut self, value: SlackDateTime) -> &mut Self
Sets timestamp to Some(value).
Sourcepub fn reset_timestamp(&mut self) -> &mut Self
pub fn reset_timestamp(&mut self) -> &mut Self
Sets timestamp to None.
Sourcepub fn mopt_timestamp(&mut self, value: Option<SlackDateTime>) -> &mut Self
pub fn mopt_timestamp(&mut self, value: Option<SlackDateTime>) -> &mut Self
Sets timestamp to the given Option.
Sourcepub fn with_timestamp(self, value: SlackDateTime) -> Self
pub fn with_timestamp(self, value: SlackDateTime) -> Self
Returns self with timestamp set to Some(value).
Sourcepub fn without_timestamp(self) -> Self
pub fn without_timestamp(self) -> Self
Returns self with timestamp set to None.
Sourcepub fn opt_timestamp(self, value: Option<SlackDateTime>) -> Self
pub fn opt_timestamp(self, value: Option<SlackDateTime>) -> Self
Returns self with timestamp set to the given Option.
Sourcepub fn reset_name(&mut self) -> &mut Self
pub fn reset_name(&mut self) -> &mut Self
Sets name to None.
Sourcepub fn without_name(self) -> Self
pub fn without_name(self) -> Self
Returns self with name set to None.
Sourcepub fn opt_name(self, value: Option<String>) -> Self
pub fn opt_name(self, value: Option<String>) -> Self
Returns self with name set to the given Option.
Sourcepub fn reset_title(&mut self) -> &mut Self
pub fn reset_title(&mut self) -> &mut Self
Sets title to None.
Sourcepub fn mopt_title(&mut self, value: Option<String>) -> &mut Self
pub fn mopt_title(&mut self, value: Option<String>) -> &mut Self
Sets title to the given Option.
Sourcepub fn with_title(self, value: String) -> Self
pub fn with_title(self, value: String) -> Self
Returns self with title set to Some(value).
Sourcepub fn without_title(self) -> Self
pub fn without_title(self) -> Self
Returns self with title set to None.
Sourcepub fn opt_title(self, value: Option<String>) -> Self
pub fn opt_title(self, value: Option<String>) -> Self
Returns self with title set to the given Option.
Sourcepub fn mimetype(&mut self, value: SlackMimeType) -> &mut Self
pub fn mimetype(&mut self, value: SlackMimeType) -> &mut Self
Sets mimetype to Some(value).
Sourcepub fn reset_mimetype(&mut self) -> &mut Self
pub fn reset_mimetype(&mut self) -> &mut Self
Sets mimetype to None.
Sourcepub fn mopt_mimetype(&mut self, value: Option<SlackMimeType>) -> &mut Self
pub fn mopt_mimetype(&mut self, value: Option<SlackMimeType>) -> &mut Self
Sets mimetype to the given Option.
Sourcepub fn with_mimetype(self, value: SlackMimeType) -> Self
pub fn with_mimetype(self, value: SlackMimeType) -> Self
Returns self with mimetype set to Some(value).
Sourcepub fn without_mimetype(self) -> Self
pub fn without_mimetype(self) -> Self
Returns self with mimetype set to None.
Sourcepub fn opt_mimetype(self, value: Option<SlackMimeType>) -> Self
pub fn opt_mimetype(self, value: Option<SlackMimeType>) -> Self
Returns self with mimetype set to the given Option.
Sourcepub fn filetype(&mut self, value: SlackFileType) -> &mut Self
pub fn filetype(&mut self, value: SlackFileType) -> &mut Self
Sets filetype to Some(value).
Sourcepub fn reset_filetype(&mut self) -> &mut Self
pub fn reset_filetype(&mut self) -> &mut Self
Sets filetype to None.
Sourcepub fn mopt_filetype(&mut self, value: Option<SlackFileType>) -> &mut Self
pub fn mopt_filetype(&mut self, value: Option<SlackFileType>) -> &mut Self
Sets filetype to the given Option.
Sourcepub fn with_filetype(self, value: SlackFileType) -> Self
pub fn with_filetype(self, value: SlackFileType) -> Self
Returns self with filetype set to Some(value).
Sourcepub fn without_filetype(self) -> Self
pub fn without_filetype(self) -> Self
Returns self with filetype set to None.
Sourcepub fn opt_filetype(self, value: Option<SlackFileType>) -> Self
pub fn opt_filetype(self, value: Option<SlackFileType>) -> Self
Returns self with filetype set to the given Option.
Sourcepub fn pretty_type(&mut self, value: SlackFilePrettyType) -> &mut Self
pub fn pretty_type(&mut self, value: SlackFilePrettyType) -> &mut Self
Sets pretty_type to Some(value).
Sourcepub fn reset_pretty_type(&mut self) -> &mut Self
pub fn reset_pretty_type(&mut self) -> &mut Self
Sets pretty_type to None.
Sourcepub fn mopt_pretty_type(
&mut self,
value: Option<SlackFilePrettyType>,
) -> &mut Self
pub fn mopt_pretty_type( &mut self, value: Option<SlackFilePrettyType>, ) -> &mut Self
Sets pretty_type to the given Option.
Sourcepub fn with_pretty_type(self, value: SlackFilePrettyType) -> Self
pub fn with_pretty_type(self, value: SlackFilePrettyType) -> Self
Returns self with pretty_type set to Some(value).
Sourcepub fn without_pretty_type(self) -> Self
pub fn without_pretty_type(self) -> Self
Returns self with pretty_type set to None.
Sourcepub fn opt_pretty_type(self, value: Option<SlackFilePrettyType>) -> Self
pub fn opt_pretty_type(self, value: Option<SlackFilePrettyType>) -> Self
Returns self with pretty_type set to the given Option.
Sourcepub fn external_type(&mut self, value: SlackFileExternalType) -> &mut Self
pub fn external_type(&mut self, value: SlackFileExternalType) -> &mut Self
Sets external_type to Some(value).
Sourcepub fn reset_external_type(&mut self) -> &mut Self
pub fn reset_external_type(&mut self) -> &mut Self
Sets external_type to None.
Sourcepub fn mopt_external_type(
&mut self,
value: Option<SlackFileExternalType>,
) -> &mut Self
pub fn mopt_external_type( &mut self, value: Option<SlackFileExternalType>, ) -> &mut Self
Sets external_type to the given Option.
Sourcepub fn with_external_type(self, value: SlackFileExternalType) -> Self
pub fn with_external_type(self, value: SlackFileExternalType) -> Self
Returns self with external_type set to Some(value).
Sourcepub fn without_external_type(self) -> Self
pub fn without_external_type(self) -> Self
Returns self with external_type set to None.
Sourcepub fn opt_external_type(self, value: Option<SlackFileExternalType>) -> Self
pub fn opt_external_type(self, value: Option<SlackFileExternalType>) -> Self
Returns self with external_type set to the given Option.
Sourcepub fn user(&mut self, value: SlackUserId) -> &mut Self
pub fn user(&mut self, value: SlackUserId) -> &mut Self
Sets user to Some(value).
Sourcepub fn reset_user(&mut self) -> &mut Self
pub fn reset_user(&mut self) -> &mut Self
Sets user to None.
Sourcepub fn mopt_user(&mut self, value: Option<SlackUserId>) -> &mut Self
pub fn mopt_user(&mut self, value: Option<SlackUserId>) -> &mut Self
Sets user to the given Option.
Sourcepub fn with_user(self, value: SlackUserId) -> Self
pub fn with_user(self, value: SlackUserId) -> Self
Returns self with user set to Some(value).
Sourcepub fn without_user(self) -> Self
pub fn without_user(self) -> Self
Returns self with user set to None.
Sourcepub fn opt_user(self, value: Option<SlackUserId>) -> Self
pub fn opt_user(self, value: Option<SlackUserId>) -> Self
Returns self with user set to the given Option.
Sourcepub fn reset_username(&mut self) -> &mut Self
pub fn reset_username(&mut self) -> &mut Self
Sets username to None.
Sourcepub fn mopt_username(&mut self, value: Option<String>) -> &mut Self
pub fn mopt_username(&mut self, value: Option<String>) -> &mut Self
Sets username to the given Option.
Sourcepub fn with_username(self, value: String) -> Self
pub fn with_username(self, value: String) -> Self
Returns self with username set to Some(value).
Sourcepub fn without_username(self) -> Self
pub fn without_username(self) -> Self
Returns self with username set to None.
Sourcepub fn opt_username(self, value: Option<String>) -> Self
pub fn opt_username(self, value: Option<String>) -> Self
Returns self with username set to the given Option.
Sourcepub fn url_private(&mut self, value: Url) -> &mut Self
pub fn url_private(&mut self, value: Url) -> &mut Self
Sets url_private to Some(value).
Sourcepub fn reset_url_private(&mut self) -> &mut Self
pub fn reset_url_private(&mut self) -> &mut Self
Sets url_private to None.
Sourcepub fn mopt_url_private(&mut self, value: Option<Url>) -> &mut Self
pub fn mopt_url_private(&mut self, value: Option<Url>) -> &mut Self
Sets url_private to the given Option.
Sourcepub fn with_url_private(self, value: Url) -> Self
pub fn with_url_private(self, value: Url) -> Self
Returns self with url_private set to Some(value).
Sourcepub fn without_url_private(self) -> Self
pub fn without_url_private(self) -> Self
Returns self with url_private set to None.
Sourcepub fn opt_url_private(self, value: Option<Url>) -> Self
pub fn opt_url_private(self, value: Option<Url>) -> Self
Returns self with url_private set to the given Option.
Sourcepub fn url_private_download(&mut self, value: Url) -> &mut Self
pub fn url_private_download(&mut self, value: Url) -> &mut Self
Sets url_private_download to Some(value).
Sourcepub fn reset_url_private_download(&mut self) -> &mut Self
pub fn reset_url_private_download(&mut self) -> &mut Self
Sets url_private_download to None.
Sourcepub fn mopt_url_private_download(&mut self, value: Option<Url>) -> &mut Self
pub fn mopt_url_private_download(&mut self, value: Option<Url>) -> &mut Self
Sets url_private_download to the given Option.
Sourcepub fn with_url_private_download(self, value: Url) -> Self
pub fn with_url_private_download(self, value: Url) -> Self
Returns self with url_private_download set to Some(value).
Sourcepub fn without_url_private_download(self) -> Self
pub fn without_url_private_download(self) -> Self
Returns self with url_private_download set to None.
Sourcepub fn opt_url_private_download(self, value: Option<Url>) -> Self
pub fn opt_url_private_download(self, value: Option<Url>) -> Self
Returns self with url_private_download set to the given Option.
Sourcepub fn reset_permalink(&mut self) -> &mut Self
pub fn reset_permalink(&mut self) -> &mut Self
Sets permalink to None.
Sourcepub fn mopt_permalink(&mut self, value: Option<Url>) -> &mut Self
pub fn mopt_permalink(&mut self, value: Option<Url>) -> &mut Self
Sets permalink to the given Option.
Sourcepub fn with_permalink(self, value: Url) -> Self
pub fn with_permalink(self, value: Url) -> Self
Returns self with permalink set to Some(value).
Sourcepub fn without_permalink(self) -> Self
pub fn without_permalink(self) -> Self
Returns self with permalink set to None.
Sourcepub fn opt_permalink(self, value: Option<Url>) -> Self
pub fn opt_permalink(self, value: Option<Url>) -> Self
Returns self with permalink set to the given Option.
Sourcepub fn permalink_public(&mut self, value: Url) -> &mut Self
pub fn permalink_public(&mut self, value: Url) -> &mut Self
Sets permalink_public to Some(value).
Sourcepub fn reset_permalink_public(&mut self) -> &mut Self
pub fn reset_permalink_public(&mut self) -> &mut Self
Sets permalink_public to None.
Sourcepub fn mopt_permalink_public(&mut self, value: Option<Url>) -> &mut Self
pub fn mopt_permalink_public(&mut self, value: Option<Url>) -> &mut Self
Sets permalink_public to the given Option.
Sourcepub fn with_permalink_public(self, value: Url) -> Self
pub fn with_permalink_public(self, value: Url) -> Self
Returns self with permalink_public set to Some(value).
Sourcepub fn without_permalink_public(self) -> Self
pub fn without_permalink_public(self) -> Self
Returns self with permalink_public set to None.
Sourcepub fn opt_permalink_public(self, value: Option<Url>) -> Self
pub fn opt_permalink_public(self, value: Option<Url>) -> Self
Returns self with permalink_public set to the given Option.
Sourcepub fn reactions(&mut self, value: Vec<SlackReaction>) -> &mut Self
pub fn reactions(&mut self, value: Vec<SlackReaction>) -> &mut Self
Sets reactions to Some(value).
Sourcepub fn reset_reactions(&mut self) -> &mut Self
pub fn reset_reactions(&mut self) -> &mut Self
Sets reactions to None.
Sourcepub fn mopt_reactions(&mut self, value: Option<Vec<SlackReaction>>) -> &mut Self
pub fn mopt_reactions(&mut self, value: Option<Vec<SlackReaction>>) -> &mut Self
Sets reactions to the given Option.
Sourcepub fn with_reactions(self, value: Vec<SlackReaction>) -> Self
pub fn with_reactions(self, value: Vec<SlackReaction>) -> Self
Returns self with reactions set to Some(value).
Sourcepub fn without_reactions(self) -> Self
pub fn without_reactions(self) -> Self
Returns self with reactions set to None.
Sourcepub fn opt_reactions(self, value: Option<Vec<SlackReaction>>) -> Self
pub fn opt_reactions(self, value: Option<Vec<SlackReaction>>) -> Self
Returns self with reactions set to the given Option.
Sourcepub fn flags(&mut self, value: SlackFileFlags) -> &mut Self
pub fn flags(&mut self, value: SlackFileFlags) -> &mut Self
Sets flags to value.
Sourcepub fn with_flags(self, value: SlackFileFlags) -> Self
pub fn with_flags(self, value: SlackFileFlags) -> Self
Returns self with flags set to value.