#[non_exhaustive]pub struct SpaceReadState {
pub name: String,
pub last_read_time: Option<Timestamp>,
/* private fields */
}Expand description
A user’s read state within a space, used to identify read and unread messages.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringResource name of the space read state.
Format: users/{user}/spaces/{space}/spaceReadState
last_read_time: Option<Timestamp>Optional. The time when the user’s space read state was updated. Usually this corresponds with either the timestamp of the last read message, or a timestamp specified by the user to mark the last read position in a space.
Implementations§
Source§impl SpaceReadState
impl SpaceReadState
Sourcepub fn set_last_read_time<T>(self, v: T) -> Self
pub fn set_last_read_time<T>(self, v: T) -> Self
Sets the value of last_read_time.
§Example
ⓘ
use wkt::Timestamp;
let x = SpaceReadState::new().set_last_read_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_last_read_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_last_read_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of last_read_time.
§Example
ⓘ
use wkt::Timestamp;
let x = SpaceReadState::new().set_or_clear_last_read_time(Some(Timestamp::default()/* use setters */));
let x = SpaceReadState::new().set_or_clear_last_read_time(None::<Timestamp>);Trait Implementations§
Source§impl Clone for SpaceReadState
impl Clone for SpaceReadState
Source§fn clone(&self) -> SpaceReadState
fn clone(&self) -> SpaceReadState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SpaceReadState
impl Debug for SpaceReadState
Source§impl Default for SpaceReadState
impl Default for SpaceReadState
Source§fn default() -> SpaceReadState
fn default() -> SpaceReadState
Returns the “default value” for a type. Read more
Source§impl Message for SpaceReadState
impl Message for SpaceReadState
Source§impl PartialEq for SpaceReadState
impl PartialEq for SpaceReadState
impl StructuralPartialEq for SpaceReadState
Auto Trait Implementations§
impl Freeze for SpaceReadState
impl RefUnwindSafe for SpaceReadState
impl Send for SpaceReadState
impl Sync for SpaceReadState
impl Unpin for SpaceReadState
impl UnsafeUnpin for SpaceReadState
impl UnwindSafe for SpaceReadState
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