#[non_exhaustive]pub struct PositionSectionRequest {
pub name: String,
pub position: Option<PositionOneof>,
/* private fields */
}Expand description
Request message for positioning a section.
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.name: StringRequired. The resource name of the section to position.
Format: users/{user}/sections/{section}
position: Option<PositionOneof>Required. The new position of the section.
Implementations§
Source§impl PositionSectionRequest
impl PositionSectionRequest
Sourcepub fn set_position<T: Into<Option<PositionOneof>>>(self, v: T) -> Self
pub fn set_position<T: Into<Option<PositionOneof>>>(self, v: T) -> Self
Sourcepub fn sort_order(&self) -> Option<&i32>
pub fn sort_order(&self) -> Option<&i32>
The value of position
if it holds a SortOrder, None if the field is not set or
holds a different branch.
Sourcepub fn set_sort_order<T: Into<i32>>(self, v: T) -> Self
pub fn set_sort_order<T: Into<i32>>(self, v: T) -> Self
Sourcepub fn relative_position(&self) -> Option<&Position>
pub fn relative_position(&self) -> Option<&Position>
The value of position
if it holds a RelativePosition, None if the field is not set or
holds a different branch.
Sourcepub fn set_relative_position<T: Into<Position>>(self, v: T) -> Self
pub fn set_relative_position<T: Into<Position>>(self, v: T) -> Self
Sets the value of position
to hold a RelativePosition.
Note that all the setters affecting position are
mutually exclusive.
§Example
ⓘ
use google_chat_v1::model::position_section_request::Position;
let x0 = PositionSectionRequest::new().set_relative_position(Position::Start);
let x1 = PositionSectionRequest::new().set_relative_position(Position::End);
assert!(x0.relative_position().is_some());
assert!(x0.sort_order().is_none());
assert!(x1.relative_position().is_some());
assert!(x1.sort_order().is_none());Trait Implementations§
Source§impl Clone for PositionSectionRequest
impl Clone for PositionSectionRequest
Source§fn clone(&self) -> PositionSectionRequest
fn clone(&self) -> PositionSectionRequest
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 PositionSectionRequest
impl Debug for PositionSectionRequest
Source§impl Default for PositionSectionRequest
impl Default for PositionSectionRequest
Source§fn default() -> PositionSectionRequest
fn default() -> PositionSectionRequest
Returns the “default value” for a type. Read more
Source§impl Message for PositionSectionRequest
impl Message for PositionSectionRequest
Source§impl PartialEq for PositionSectionRequest
impl PartialEq for PositionSectionRequest
impl StructuralPartialEq for PositionSectionRequest
Auto Trait Implementations§
impl Freeze for PositionSectionRequest
impl RefUnwindSafe for PositionSectionRequest
impl Send for PositionSectionRequest
impl Sync for PositionSectionRequest
impl Unpin for PositionSectionRequest
impl UnsafeUnpin for PositionSectionRequest
impl UnwindSafe for PositionSectionRequest
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