#[non_exhaustive]pub struct UpdateMessageRequest {
pub message: Option<Message>,
pub update_mask: Option<FieldMask>,
pub allow_missing: bool,
/* private fields */
}Expand description
Request to update a message.
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.message: Option<Message>Required. Message with fields updated.
update_mask: Option<FieldMask>Required. The field paths to update. Separate multiple values with commas
or use * to update all field paths.
Currently supported field paths:
-
text -
attachment -
cards(Requires app authentication.) -
cards_v2(Requires app authentication.) -
accessory_widgets(Requires app authentication.) -
quoted_message_metadata(Only allows removal of the quoted message.)
allow_missing: boolOptional. If true and the message isn’t found, a new message is created
and updateMask is ignored. The specified message ID must be
client-assigned
or the request fails.
Implementations§
Source§impl UpdateMessageRequest
impl UpdateMessageRequest
Sourcepub fn set_message<T>(self, v: T) -> Self
pub fn set_message<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_message<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_message<T>(self, v: Option<T>) -> Self
Sourcepub fn set_update_mask<T>(self, v: T) -> Self
pub fn set_update_mask<T>(self, v: T) -> Self
Sets the value of update_mask.
§Example
ⓘ
use wkt::FieldMask;
let x = UpdateMessageRequest::new().set_update_mask(FieldMask::default()/* use setters */);Sourcepub fn set_or_clear_update_mask<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_update_mask<T>(self, v: Option<T>) -> Self
Sets or clears the value of update_mask.
§Example
ⓘ
use wkt::FieldMask;
let x = UpdateMessageRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
let x = UpdateMessageRequest::new().set_or_clear_update_mask(None::<FieldMask>);Sourcepub fn set_allow_missing<T: Into<bool>>(self, v: T) -> Self
pub fn set_allow_missing<T: Into<bool>>(self, v: T) -> Self
Sets the value of allow_missing.
§Example
ⓘ
let x = UpdateMessageRequest::new().set_allow_missing(true);Trait Implementations§
Source§impl Clone for UpdateMessageRequest
impl Clone for UpdateMessageRequest
Source§fn clone(&self) -> UpdateMessageRequest
fn clone(&self) -> UpdateMessageRequest
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 UpdateMessageRequest
impl Debug for UpdateMessageRequest
Source§impl Default for UpdateMessageRequest
impl Default for UpdateMessageRequest
Source§fn default() -> UpdateMessageRequest
fn default() -> UpdateMessageRequest
Returns the “default value” for a type. Read more
Source§impl Message for UpdateMessageRequest
impl Message for UpdateMessageRequest
Source§impl PartialEq for UpdateMessageRequest
impl PartialEq for UpdateMessageRequest
impl StructuralPartialEq for UpdateMessageRequest
Auto Trait Implementations§
impl Freeze for UpdateMessageRequest
impl RefUnwindSafe for UpdateMessageRequest
impl Send for UpdateMessageRequest
impl Sync for UpdateMessageRequest
impl Unpin for UpdateMessageRequest
impl UnsafeUnpin for UpdateMessageRequest
impl UnwindSafe for UpdateMessageRequest
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