#[non_exhaustive]pub struct OsConstraint {
pub os_type: OsType,
pub minimum_version: String,
pub require_verified_chrome_os: bool,
/* private fields */
}Expand description
A restriction on the OS type and version of devices making requests.
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.os_type: OsTypeRequired. The allowed OS type.
minimum_version: StringThe minimum allowed OS version. If not set, any version of this OS
satisfies the constraint. Format: "major.minor.patch".
Examples: "10.5.301", "9.2.1".
require_verified_chrome_os: boolOnly allows requests from devices with a verified Chrome OS. Verifications includes requirements that the device is enterprise-managed, conformant to domain policies, and the caller has permission to call the API targeted by the request.
Implementations§
Source§impl OsConstraint
impl OsConstraint
pub fn new() -> Self
Sourcepub fn set_os_type<T: Into<OsType>>(self, v: T) -> Self
pub fn set_os_type<T: Into<OsType>>(self, v: T) -> Self
Sets the value of os_type.
Sourcepub fn set_minimum_version<T: Into<String>>(self, v: T) -> Self
pub fn set_minimum_version<T: Into<String>>(self, v: T) -> Self
Sets the value of minimum_version.
Sourcepub fn set_require_verified_chrome_os<T: Into<bool>>(self, v: T) -> Self
pub fn set_require_verified_chrome_os<T: Into<bool>>(self, v: T) -> Self
Sets the value of require_verified_chrome_os.
Trait Implementations§
Source§impl Clone for OsConstraint
impl Clone for OsConstraint
Source§fn clone(&self) -> OsConstraint
fn clone(&self) -> OsConstraint
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 OsConstraint
impl Debug for OsConstraint
Source§impl Default for OsConstraint
impl Default for OsConstraint
Source§fn default() -> OsConstraint
fn default() -> OsConstraint
Returns the “default value” for a type. Read more
Source§impl Message for OsConstraint
impl Message for OsConstraint
Source§impl PartialEq for OsConstraint
impl PartialEq for OsConstraint
impl StructuralPartialEq for OsConstraint
Auto Trait Implementations§
impl Freeze for OsConstraint
impl RefUnwindSafe for OsConstraint
impl Send for OsConstraint
impl Sync for OsConstraint
impl Unpin for OsConstraint
impl UnwindSafe for OsConstraint
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