pub struct UnrecognizedModifier(pub u64);
Expand description
Wraps some u64 that isn’t a DRM modifier we recognize
// Get the u64
assert_eq!(UnrecognizedModifier(42).0, 42);
Tuple Fields§
§0: u64
Implementations§
Source§impl UnrecognizedModifier
impl UnrecognizedModifier
Sourcepub fn vendor(&self) -> Result<Option<DrmVendor>, UnrecognizedVendor>
pub fn vendor(&self) -> Result<Option<DrmVendor>, UnrecognizedVendor>
Get the vendor of the unrecognized modifier, if any
assert_eq!(UnrecognizedModifier(216172782113783827).vendor(), Ok(Some(DrmVendor::Nvidia)));
assert_eq!(UnrecognizedModifier(2).vendor(), Ok(None));
assert_eq!(UnrecognizedModifier(8646911284551352320).vendor(), Err(UnrecognizedVendor(120)));
Trait Implementations§
Source§impl Clone for UnrecognizedModifier
impl Clone for UnrecognizedModifier
Source§fn clone(&self) -> UnrecognizedModifier
fn clone(&self) -> UnrecognizedModifier
Returns a copy 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 UnrecognizedModifier
impl Debug for UnrecognizedModifier
Source§impl Display for UnrecognizedModifier
impl Display for UnrecognizedModifier
Source§impl Error for UnrecognizedModifier
impl Error for UnrecognizedModifier
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl PartialEq for UnrecognizedModifier
impl PartialEq for UnrecognizedModifier
impl Copy for UnrecognizedModifier
impl Eq for UnrecognizedModifier
impl StructuralPartialEq for UnrecognizedModifier
Auto Trait Implementations§
impl Freeze for UnrecognizedModifier
impl RefUnwindSafe for UnrecognizedModifier
impl Send for UnrecognizedModifier
impl Sync for UnrecognizedModifier
impl Unpin for UnrecognizedModifier
impl UnwindSafe for UnrecognizedModifier
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