#[non_exhaustive]pub struct PanelInfo {
pub panel_id: String,
pub display_name: String,
pub panel_position: Option<i32>,
pub total_panels: Option<i32>,
pub documents: Vec<DocumentInfo>,
/* private fields */
}Available on crate features
recommendation-service or user-event-service only.Expand description
Detailed panel information associated with a user event.
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.panel_id: StringRequired. The panel ID.
display_name: StringThe display name of the panel.
panel_position: Option<i32>The ordered position of the panel, if shown to the user with other panels. If set, then total_panels must also be set.
total_panels: Option<i32>The total number of panels, including this one, shown to the user. Must be set if panel_position is set.
documents: Vec<DocumentInfo>Optional. The document IDs associated with this panel.
Implementations§
Source§impl PanelInfo
impl PanelInfo
pub fn new() -> Self
Sourcepub fn set_panel_id<T: Into<String>>(self, v: T) -> Self
pub fn set_panel_id<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_display_name<T: Into<String>>(self, v: T) -> Self
pub fn set_display_name<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_panel_position<T>(self, v: T) -> Self
pub fn set_panel_position<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_panel_position<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_panel_position<T>(self, v: Option<T>) -> Self
Sets or clears the value of panel_position.
§Example
ⓘ
let x = PanelInfo::new().set_or_clear_panel_position(Some(42));
let x = PanelInfo::new().set_or_clear_panel_position(None::<i32>);Sourcepub fn set_total_panels<T>(self, v: T) -> Self
pub fn set_total_panels<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_total_panels<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_total_panels<T>(self, v: Option<T>) -> Self
Sets or clears the value of total_panels.
§Example
ⓘ
let x = PanelInfo::new().set_or_clear_total_panels(Some(42));
let x = PanelInfo::new().set_or_clear_total_panels(None::<i32>);Sourcepub fn set_documents<T, V>(self, v: T) -> Self
pub fn set_documents<T, V>(self, v: T) -> Self
Trait Implementations§
impl StructuralPartialEq for PanelInfo
Auto Trait Implementations§
impl Freeze for PanelInfo
impl RefUnwindSafe for PanelInfo
impl Send for PanelInfo
impl Sync for PanelInfo
impl Unpin for PanelInfo
impl UnwindSafe for PanelInfo
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