#[non_exhaustive]pub struct PinControlMetadata {
pub all_matched_pins: HashMap<i64, ProductPins>,
pub dropped_pins: HashMap<i64, ProductPins>,
/* private fields */
}Expand description
Metadata for pinning to be returned in the response. This is used for distinguishing between applied vs dropped pins.
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.all_matched_pins: HashMap<i64, ProductPins>Map of all matched pins, keyed by pin position.
dropped_pins: HashMap<i64, ProductPins>Map of pins that were dropped due to overlap with other matching pins, keyed by pin position.
Implementations§
Source§impl PinControlMetadata
impl PinControlMetadata
pub fn new() -> Self
Sourcepub fn set_all_matched_pins<T, K, V>(self, v: T) -> Self
pub fn set_all_matched_pins<T, K, V>(self, v: T) -> Self
Sets the value of all_matched_pins.
§Example
ⓘ
use google_cloud_retail_v2::model::pin_control_metadata::ProductPins;
let x = PinControlMetadata::new().set_all_matched_pins([
(0, ProductPins::default()/* use setters */),
(1, ProductPins::default()/* use (different) setters */),
]);Sourcepub fn set_dropped_pins<T, K, V>(self, v: T) -> Self
pub fn set_dropped_pins<T, K, V>(self, v: T) -> Self
Sets the value of dropped_pins.
§Example
ⓘ
use google_cloud_retail_v2::model::pin_control_metadata::ProductPins;
let x = PinControlMetadata::new().set_dropped_pins([
(0, ProductPins::default()/* use setters */),
(1, ProductPins::default()/* use (different) setters */),
]);Trait Implementations§
Source§impl Clone for PinControlMetadata
impl Clone for PinControlMetadata
Source§fn clone(&self) -> PinControlMetadata
fn clone(&self) -> PinControlMetadata
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 PinControlMetadata
impl Debug for PinControlMetadata
Source§impl Default for PinControlMetadata
impl Default for PinControlMetadata
Source§fn default() -> PinControlMetadata
fn default() -> PinControlMetadata
Returns the “default value” for a type. Read more
Source§impl Message for PinControlMetadata
impl Message for PinControlMetadata
Source§impl PartialEq for PinControlMetadata
impl PartialEq for PinControlMetadata
impl StructuralPartialEq for PinControlMetadata
Auto Trait Implementations§
impl Freeze for PinControlMetadata
impl RefUnwindSafe for PinControlMetadata
impl Send for PinControlMetadata
impl Sync for PinControlMetadata
impl Unpin for PinControlMetadata
impl UnwindSafe for PinControlMetadata
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