pub struct SlackPin {
pub channel: SlackChannelId,
pub created: SlackDateTime,
pub created_by: SlackUserId,
pub message: Option<SlackMessage>,
}Fields§
§channel: SlackChannelId§created: SlackDateTime§created_by: SlackUserId§message: Option<SlackMessage>Implementations§
Source§impl SlackPin
impl SlackPin
Sourcepub fn new(
channel: SlackChannelId,
created: SlackDateTime,
created_by: SlackUserId,
) -> Self
pub fn new( channel: SlackChannelId, created: SlackDateTime, created_by: SlackUserId, ) -> Self
Creates a new SlackPin from its required fields. Option fields start as None, and fields with #[default] take their default.
Sourcepub fn channel(&mut self, value: SlackChannelId) -> &mut Self
pub fn channel(&mut self, value: SlackChannelId) -> &mut Self
Sets channel to value.
Sourcepub fn with_channel(self, value: SlackChannelId) -> Self
pub fn with_channel(self, value: SlackChannelId) -> Self
Returns self with channel set to value.
Sourcepub fn created(&mut self, value: SlackDateTime) -> &mut Self
pub fn created(&mut self, value: SlackDateTime) -> &mut Self
Sets created to value.
Sourcepub fn with_created(self, value: SlackDateTime) -> Self
pub fn with_created(self, value: SlackDateTime) -> Self
Returns self with created set to value.
Sourcepub fn created_by(&mut self, value: SlackUserId) -> &mut Self
pub fn created_by(&mut self, value: SlackUserId) -> &mut Self
Sets created_by to value.
Sourcepub fn with_created_by(self, value: SlackUserId) -> Self
pub fn with_created_by(self, value: SlackUserId) -> Self
Returns self with created_by set to value.
Sourcepub fn message(&mut self, value: SlackMessage) -> &mut Self
pub fn message(&mut self, value: SlackMessage) -> &mut Self
Sets message to Some(value).
Sourcepub fn reset_message(&mut self) -> &mut Self
pub fn reset_message(&mut self) -> &mut Self
Sets message to None.
Sourcepub fn mopt_message(&mut self, value: Option<SlackMessage>) -> &mut Self
pub fn mopt_message(&mut self, value: Option<SlackMessage>) -> &mut Self
Sets message to the given Option.
Sourcepub fn with_message(self, value: SlackMessage) -> Self
pub fn with_message(self, value: SlackMessage) -> Self
Returns self with message set to Some(value).
Sourcepub fn without_message(self) -> Self
pub fn without_message(self) -> Self
Returns self with message set to None.
Sourcepub fn opt_message(self, value: Option<SlackMessage>) -> Self
pub fn opt_message(self, value: Option<SlackMessage>) -> Self
Returns self with message set to the given Option.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SlackPin
impl<'de> Deserialize<'de> for SlackPin
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
Source§impl From<SlackPinInit> for SlackPin
impl From<SlackPinInit> for SlackPin
Source§fn from(value: SlackPinInit) -> Self
fn from(value: SlackPinInit) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for SlackPin
Auto Trait Implementations§
impl Freeze for SlackPin
impl RefUnwindSafe for SlackPin
impl Send for SlackPin
impl Sync for SlackPin
impl Unpin for SlackPin
impl UnsafeUnpin for SlackPin
impl UnwindSafe for SlackPin
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