pub struct EditHistory { /* private fields */ }Expand description
Represents a the edit history of a message returned by the Zulip API server.
Implementations§
Source§impl EditHistory
impl EditHistory
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Creates a new EditHistory.
Source§impl EditHistory
impl EditHistory
Sourcepub fn prev_content(&self) -> Option<&str>
pub fn prev_content(&self) -> Option<&str>
Gets the EditHistory prev_content.
Only present if message’s content was edited.
The content of the message immediately prior to this edit event.
Sourcepub fn set_prev_content<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
pub fn set_prev_content<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
Sets the EditHistory prev_content.
Only present if message’s content was edited.
The content of the message immediately prior to this edit event.
Sourcepub fn unset_prev_content(&mut self) -> Option<String>
pub fn unset_prev_content(&mut self) -> Option<String>
Unsets the EditHistory prev_content.
Only present if message’s content was edited.
The content of the message immediately prior to this edit event.
Sourcepub fn with_prev_content<'a, C: Into<Cow<'a, str>>>(self, val: C) -> Self
pub fn with_prev_content<'a, C: Into<Cow<'a, str>>>(self, val: C) -> Self
Builder function that sets the EditHistory prev_content.
Only present if message’s content was edited.
The content of the message immediately prior to this edit event.
Sourcepub fn prev_rendered_content(&self) -> Option<&str>
pub fn prev_rendered_content(&self) -> Option<&str>
Gets the EditHistory prev_rendered_content.
Only present if message’s content was edited.
The rendered HTML representation of prev_content.
See Markdown message formatting for details on Zulip’s HTML format.
Sourcepub fn set_prev_rendered_content<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
pub fn set_prev_rendered_content<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
Sets the EditHistory prev_rendered_content.
Only present if message’s content was edited.
The rendered HTML representation of prev_content.
See Markdown message formatting for details on Zulip’s HTML format.
Sourcepub fn unset_prev_rendered_content(&mut self) -> Option<String>
pub fn unset_prev_rendered_content(&mut self) -> Option<String>
Unsets the EditHistory prev_rendered_content.
Only present if message’s content was edited.
The rendered HTML representation of prev_content.
See Markdown message formatting for details on Zulip’s HTML format.
Sourcepub fn with_prev_rendered_content<'a, C: Into<Cow<'a, str>>>(
self,
val: C,
) -> Self
pub fn with_prev_rendered_content<'a, C: Into<Cow<'a, str>>>( self, val: C, ) -> Self
Builder function that sets the EditHistory prev_rendered_content.
Only present if message’s content was edited.
The rendered HTML representation of prev_content.
See Markdown message formatting for details on Zulip’s HTML format.
Sourcepub fn prev_topic(&self) -> Option<&str>
pub fn prev_topic(&self) -> Option<&str>
Gets the EditHistory prev_topic.
Only present if message’s topic was edited.
The topic of the message immediately prior to this edit event.
Changes: New in Zulip 5.0 (feature level 118).
Previously, this field was called prev_subject;
clients are recommended to rename prev_subject to
prev_topic if present for compatibility with older Zulip servers.
Sourcepub fn set_prev_topic<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
pub fn set_prev_topic<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
Sets the EditHistory prev_topic.
Only present if message’s topic was edited.
The topic of the message immediately prior to this edit event.
Changes: New in Zulip 5.0 (feature level 118).
Previously, this field was called prev_subject;
clients are recommended to rename prev_subject to
prev_topic if present for compatibility with older Zulip servers.
Sourcepub fn unset_prev_topic(&mut self) -> Option<String>
pub fn unset_prev_topic(&mut self) -> Option<String>
Unsets the EditHistory prev_topic.
Only present if message’s topic was edited.
The topic of the message immediately prior to this edit event.
Changes: New in Zulip 5.0 (feature level 118).
Previously, this field was called prev_subject;
clients are recommended to rename prev_subject to
prev_topic if present for compatibility with older Zulip servers.
Sourcepub fn with_prev_topic<'a, C: Into<Cow<'a, str>>>(self, val: C) -> Self
pub fn with_prev_topic<'a, C: Into<Cow<'a, str>>>(self, val: C) -> Self
Builder function that sets the EditHistory prev_topic.
Only present if message’s topic was edited.
The topic of the message immediately prior to this edit event.
Changes: New in Zulip 5.0 (feature level 118).
Previously, this field was called prev_subject;
clients are recommended to rename prev_subject to
prev_topic if present for compatibility with older Zulip servers.
Sourcepub fn stream(&self) -> Option<&str>
pub fn stream(&self) -> Option<&str>
Gets the EditHistory stream.
Only present if message’s channel was edited.
The ID of the channel containing the message
immediately after this edit event.
Changes: New in Zulip 5.0 (feature level 118).
Sourcepub fn set_stream<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
pub fn set_stream<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
Sets the EditHistory stream.
Only present if message’s channel was edited.
The ID of the channel containing the message
immediately after this edit event.
Changes: New in Zulip 5.0 (feature level 118).
Sourcepub fn unset_stream(&mut self) -> Option<String>
pub fn unset_stream(&mut self) -> Option<String>
Unsets the EditHistory stream.
Only present if message’s channel was edited.
The ID of the channel containing the message
immediately after this edit event.
Changes: New in Zulip 5.0 (feature level 118).
Sourcepub fn with_stream<'a, C: Into<Cow<'a, str>>>(self, val: C) -> Self
pub fn with_stream<'a, C: Into<Cow<'a, str>>>(self, val: C) -> Self
Builder function that sets the EditHistory stream.
Only present if message’s channel was edited.
The ID of the channel containing the message
immediately after this edit event.
Changes: New in Zulip 5.0 (feature level 118).
Sourcepub fn topic(&self) -> Option<&str>
pub fn topic(&self) -> Option<&str>
Gets the EditHistory topic.
Only present if message’s topic was edited.
The topic of the message immediately after this edit event.
Changes: New in Zulip 5.0 (feature level 118).
Sourcepub fn set_topic<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
pub fn set_topic<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
Sets the EditHistory topic.
Only present if message’s topic was edited.
The topic of the message immediately after this edit event.
Changes: New in Zulip 5.0 (feature level 118).
Sourcepub fn unset_topic(&mut self) -> Option<String>
pub fn unset_topic(&mut self) -> Option<String>
Unsets the EditHistory topic.
Only present if message’s topic was edited.
The topic of the message immediately after this edit event.
Changes: New in Zulip 5.0 (feature level 118).
Sourcepub fn with_topic<'a, C: Into<Cow<'a, str>>>(self, val: C) -> Self
pub fn with_topic<'a, C: Into<Cow<'a, str>>>(self, val: C) -> Self
Builder function that sets the EditHistory topic.
Only present if message’s topic was edited.
The topic of the message immediately after this edit event.
Changes: New in Zulip 5.0 (feature level 118).
Source§impl EditHistory
impl EditHistory
Sourcepub const fn prev_stream(&self) -> Option<u64>
pub const fn prev_stream(&self) -> Option<u64>
Gets the EditHistory prev_stream.
Only present if message’s channel was edited.
The channel ID of the message immediately prior to this edit event.
Changes: New in Zulip 3.0 (feature level 1).
Sourcepub fn set_prev_stream(&mut self, val: u64)
pub fn set_prev_stream(&mut self, val: u64)
Sets the EditHistory prev_stream.
Only present if message’s channel was edited.
The channel ID of the message immediately prior to this edit event.
Changes: New in Zulip 3.0 (feature level 1).
Sourcepub fn unset_prev_stream(&mut self) -> Option<u64>
pub fn unset_prev_stream(&mut self) -> Option<u64>
Unsets the EditHistory prev_stream.
Only present if message’s channel was edited.
The channel ID of the message immediately prior to this edit event.
Changes: New in Zulip 3.0 (feature level 1).
Sourcepub fn with_prev_stream(self, val: u64) -> Self
pub fn with_prev_stream(self, val: u64) -> Self
Builder function that sets the EditHistory prev_stream.
Only present if message’s channel was edited.
The channel ID of the message immediately prior to this edit event.
Changes: New in Zulip 3.0 (feature level 1).
Sourcepub const fn timestamp(&self) -> Option<u64>
pub const fn timestamp(&self) -> Option<u64>
Gets the EditHistory timestamp.
The UNIX timestamp for the edit.
Sourcepub fn set_timestamp(&mut self, val: u64)
pub fn set_timestamp(&mut self, val: u64)
Sets the EditHistory timestamp.
The UNIX timestamp for the edit.
Sourcepub fn unset_timestamp(&mut self) -> Option<u64>
pub fn unset_timestamp(&mut self) -> Option<u64>
Unsets the EditHistory timestamp.
The UNIX timestamp for the edit.
Sourcepub fn with_timestamp(self, val: u64) -> Self
pub fn with_timestamp(self, val: u64) -> Self
Builder function that sets the EditHistory timestamp.
The UNIX timestamp for the edit.
Sourcepub const fn user_id(&self) -> Option<u64>
pub const fn user_id(&self) -> Option<u64>
Gets the EditHistory user_id.
The ID of the user that made the edit.
Will be null only for edit history events predating March 2017.
Clients can display edit history events where this
is null as modified by either the sender (for content
edits) or an unknown user (for topic edits).
Sourcepub fn set_user_id(&mut self, val: u64)
pub fn set_user_id(&mut self, val: u64)
Sets the EditHistory user_id.
The ID of the user that made the edit.
Will be null only for edit history events predating March 2017.
Clients can display edit history events where this
is null as modified by either the sender (for content
edits) or an unknown user (for topic edits).
Sourcepub fn unset_user_id(&mut self) -> Option<u64>
pub fn unset_user_id(&mut self) -> Option<u64>
Unsets the EditHistory user_id.
The ID of the user that made the edit.
Will be null only for edit history events predating March 2017.
Clients can display edit history events where this
is null as modified by either the sender (for content
edits) or an unknown user (for topic edits).
Sourcepub fn with_user_id(self, val: u64) -> Self
pub fn with_user_id(self, val: u64) -> Self
Builder function that sets the EditHistory user_id.
The ID of the user that made the edit.
Will be null only for edit history events predating March 2017.
Clients can display edit history events where this
is null as modified by either the sender (for content
edits) or an unknown user (for topic edits).
Trait Implementations§
Source§impl Clone for EditHistory
impl Clone for EditHistory
Source§impl Debug for EditHistory
impl Debug for EditHistory
Source§impl Default for EditHistory
impl Default for EditHistory
Source§impl<'de> Deserialize<'de> for EditHistory
impl<'de> Deserialize<'de> for EditHistory
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>,
Source§impl Display for EditHistory
impl Display for EditHistory
impl Eq for EditHistory
Source§impl<'c> From<&'c EditHistory> for Cow<'c, EditHistory>
impl<'c> From<&'c EditHistory> for Cow<'c, EditHistory>
Source§fn from(val: &'c EditHistory) -> Self
fn from(val: &'c EditHistory) -> Self
Source§impl<'c> From<Cow<'c, EditHistory>> for EditHistory
impl<'c> From<Cow<'c, EditHistory>> for EditHistory
Source§impl<'c> From<EditHistory> for Cow<'c, EditHistory>
impl<'c> From<EditHistory> for Cow<'c, EditHistory>
Source§fn from(val: EditHistory) -> Self
fn from(val: EditHistory) -> Self
Source§impl PartialEq for EditHistory
impl PartialEq for EditHistory
Source§impl Serialize for EditHistory
impl Serialize for EditHistory
impl StructuralPartialEq for EditHistory
Auto Trait Implementations§
impl Freeze for EditHistory
impl RefUnwindSafe for EditHistory
impl Send for EditHistory
impl Sync for EditHistory
impl Unpin for EditHistory
impl UnsafeUnpin for EditHistory
impl UnwindSafe for EditHistory
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.