#[non_exhaustive]pub struct CustomContextUpdates {
pub updates: HashMap<String, ObjectCustomContextPayload>,
pub keys_to_clear: Vec<String>,
/* private fields */
}Expand description
Describes a collection of updates to apply to custom contexts identified by key.
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.updates: HashMap<String, ObjectCustomContextPayload>Optional. Insert or update the existing custom contexts.
keys_to_clear: Vec<String>Optional. Custom contexts to clear by key.
A key cannot be present in both updates and keys_to_clear.
Implementations§
Source§impl CustomContextUpdates
impl CustomContextUpdates
pub fn new() -> Self
Sourcepub fn set_updates<T, K, V>(self, v: T) -> Self
pub fn set_updates<T, K, V>(self, v: T) -> Self
Sets the value of updates.
§Example
ⓘ
use google_cloud_storagebatchoperations_v1::model::ObjectCustomContextPayload;
let x = CustomContextUpdates::new().set_updates([
("key0", ObjectCustomContextPayload::default()/* use setters */),
("key1", ObjectCustomContextPayload::default()/* use (different) setters */),
]);Sourcepub fn set_keys_to_clear<T, V>(self, v: T) -> Self
pub fn set_keys_to_clear<T, V>(self, v: T) -> Self
Sets the value of keys_to_clear.
§Example
ⓘ
let x = CustomContextUpdates::new().set_keys_to_clear(["a", "b", "c"]);Trait Implementations§
Source§impl Clone for CustomContextUpdates
impl Clone for CustomContextUpdates
Source§fn clone(&self) -> CustomContextUpdates
fn clone(&self) -> CustomContextUpdates
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 CustomContextUpdates
impl Debug for CustomContextUpdates
Source§impl Default for CustomContextUpdates
impl Default for CustomContextUpdates
Source§fn default() -> CustomContextUpdates
fn default() -> CustomContextUpdates
Returns the “default value” for a type. Read more
Source§impl Message for CustomContextUpdates
impl Message for CustomContextUpdates
Source§impl PartialEq for CustomContextUpdates
impl PartialEq for CustomContextUpdates
impl StructuralPartialEq for CustomContextUpdates
Auto Trait Implementations§
impl Freeze for CustomContextUpdates
impl RefUnwindSafe for CustomContextUpdates
impl Send for CustomContextUpdates
impl Sync for CustomContextUpdates
impl Unpin for CustomContextUpdates
impl UnsafeUnpin for CustomContextUpdates
impl UnwindSafe for CustomContextUpdates
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