#[non_exhaustive]pub struct Message {
pub body: Option<Body>,
pub attachments: Vec<Attachment>,
pub create_time: Option<Timestamp>,
pub localization_time: Option<Timestamp>,
/* private fields */
}Expand description
A message which contains notification details.
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.body: Option<Body>The message content.
attachments: Vec<Attachment>The attachments to download.
create_time: Option<Timestamp>The Message creation timestamp.
localization_time: Option<Timestamp>Time when Message was localized
Implementations§
Source§impl Message
impl Message
Sourcepub fn set_or_clear_body<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_body<T>(self, v: Option<T>) -> Self
Sourcepub fn set_attachments<T, V>(self, v: T) -> Self
pub fn set_attachments<T, V>(self, v: T) -> Self
Sets the value of attachments.
§Example
ⓘ
use google_cloud_advisorynotifications_v1::model::Attachment;
let x = Message::new()
.set_attachments([
Attachment::default()/* use setters */,
Attachment::default()/* use (different) setters */,
]);Sourcepub fn set_create_time<T>(self, v: T) -> Self
pub fn set_create_time<T>(self, v: T) -> Self
Sets the value of create_time.
§Example
ⓘ
use wkt::Timestamp;
let x = Message::new().set_create_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of create_time.
§Example
ⓘ
use wkt::Timestamp;
let x = Message::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = Message::new().set_or_clear_create_time(None::<Timestamp>);Sourcepub fn set_localization_time<T>(self, v: T) -> Self
pub fn set_localization_time<T>(self, v: T) -> Self
Sets the value of localization_time.
§Example
ⓘ
use wkt::Timestamp;
let x = Message::new().set_localization_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_localization_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_localization_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of localization_time.
§Example
ⓘ
use wkt::Timestamp;
let x = Message::new().set_or_clear_localization_time(Some(Timestamp::default()/* use setters */));
let x = Message::new().set_or_clear_localization_time(None::<Timestamp>);Trait Implementations§
impl StructuralPartialEq for Message
Auto Trait Implementations§
impl Freeze for Message
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnsafeUnpin for Message
impl UnwindSafe for Message
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