#[non_exhaustive]pub struct SessionStateEvent {
pub session_state: SessionState,
pub event_time: Option<Timestamp>,
pub state_message: String,
/* private fields */
}Expand description
A message encapsulating a series of Session states and the time that the DeviceSession first entered those states.
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.session_state: SessionStateOutput only. The session_state tracked by this event
event_time: Option<Timestamp>Output only. The time that the session_state first encountered that state.
state_message: StringOutput only. A human-readable message to explain the state.
Implementations§
Source§impl SessionStateEvent
impl SessionStateEvent
pub fn new() -> Self
Sourcepub fn set_session_state<T: Into<SessionState>>(self, v: T) -> Self
pub fn set_session_state<T: Into<SessionState>>(self, v: T) -> Self
Sets the value of session_state.
§Example
ⓘ
use google_cloud_devicestreaming_v1::model::device_session::SessionState;
let x0 = SessionStateEvent::new().set_session_state(SessionState::Requested);
let x1 = SessionStateEvent::new().set_session_state(SessionState::Pending);
let x2 = SessionStateEvent::new().set_session_state(SessionState::Active);Sourcepub fn set_event_time<T>(self, v: T) -> Self
pub fn set_event_time<T>(self, v: T) -> Self
Sets the value of event_time.
§Example
ⓘ
use wkt::Timestamp;
let x = SessionStateEvent::new().set_event_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_event_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_event_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of event_time.
§Example
ⓘ
use wkt::Timestamp;
let x = SessionStateEvent::new().set_or_clear_event_time(Some(Timestamp::default()/* use setters */));
let x = SessionStateEvent::new().set_or_clear_event_time(None::<Timestamp>);Sourcepub fn set_state_message<T: Into<String>>(self, v: T) -> Self
pub fn set_state_message<T: Into<String>>(self, v: T) -> Self
Sets the value of state_message.
§Example
ⓘ
let x = SessionStateEvent::new().set_state_message("example");Trait Implementations§
Source§impl Clone for SessionStateEvent
impl Clone for SessionStateEvent
Source§fn clone(&self) -> SessionStateEvent
fn clone(&self) -> SessionStateEvent
Returns a duplicate of the value. Read more
1.0.0 · 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 SessionStateEvent
impl Debug for SessionStateEvent
Source§impl Default for SessionStateEvent
impl Default for SessionStateEvent
Source§fn default() -> SessionStateEvent
fn default() -> SessionStateEvent
Returns the “default value” for a type. Read more
Source§impl Message for SessionStateEvent
impl Message for SessionStateEvent
Source§impl PartialEq for SessionStateEvent
impl PartialEq for SessionStateEvent
impl StructuralPartialEq for SessionStateEvent
Auto Trait Implementations§
impl Freeze for SessionStateEvent
impl RefUnwindSafe for SessionStateEvent
impl Send for SessionStateEvent
impl Sync for SessionStateEvent
impl Unpin for SessionStateEvent
impl UnwindSafe for SessionStateEvent
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