pub enum Value<'a> {
Show 14 variants
Unknown(RawValue),
Boolean(bool),
UnsignedRange(u64),
SignedRange(i64),
Enum(Option<&'a EnumValue>),
Bitmask(u64),
Blob(u64),
Object(Option<RawResourceHandle>),
CRTC(Option<Handle>),
Connector(Option<Handle>),
Encoder(Option<Handle>),
Framebuffer(Option<Handle>),
Plane(Option<Handle>),
Property(Option<Handle>),
}
Expand description
The value of a property, in a typed format
Variants§
Unknown(RawValue)
Unknown value
Boolean(bool)
Boolean value
UnsignedRange(u64)
Unsigned range value
SignedRange(i64)
Signed range value
Enum(Option<&'a EnumValue>)
Enum Value
Bitmask(u64)
Bitmask value
Blob(u64)
Opaque (blob) value
Object(Option<RawResourceHandle>)
Unknown object value
CRTC(Option<Handle>)
Crtc object value
Connector(Option<Handle>)
Connector object value
Encoder(Option<Handle>)
Encoder object value
Framebuffer(Option<Handle>)
Framebuffer object value
Plane(Option<Handle>)
Plane object value
Property(Option<Handle>)
Property object value
Implementations§
source§impl<'a> Value<'a>
impl<'a> Value<'a>
sourcepub fn as_boolean(&self) -> Option<bool>
pub fn as_boolean(&self) -> Option<bool>
Boolean value
sourcepub fn as_unsigned_range(&self) -> Option<u64>
pub fn as_unsigned_range(&self) -> Option<u64>
Unsigned range value
sourcepub fn as_signed_range(&self) -> Option<i64>
pub fn as_signed_range(&self) -> Option<i64>
Signed range value
sourcepub fn as_bitmask(&self) -> Option<u64>
pub fn as_bitmask(&self) -> Option<u64>
Bitmask value
sourcepub fn as_object(&self) -> Option<RawResourceHandle>
pub fn as_object(&self) -> Option<RawResourceHandle>
Unknown object value
sourcepub fn as_connector(&self) -> Option<Handle>
pub fn as_connector(&self) -> Option<Handle>
Connector object value
sourcepub fn as_encoder(&self) -> Option<Handle>
pub fn as_encoder(&self) -> Option<Handle>
Encoder object value
sourcepub fn as_framebuffer(&self) -> Option<Handle>
pub fn as_framebuffer(&self) -> Option<Handle>
Framebuffer object value
sourcepub fn as_property(&self) -> Option<Handle>
pub fn as_property(&self) -> Option<Handle>
Property object value
Trait Implementations§
impl<'a> Copy for Value<'a>
impl<'a> Eq for Value<'a>
impl<'a> StructuralPartialEq for Value<'a>
Auto Trait Implementations§
impl<'a> Freeze for Value<'a>
impl<'a> RefUnwindSafe for Value<'a>
impl<'a> Send for Value<'a>
impl<'a> Sync for Value<'a>
impl<'a> Unpin for Value<'a>
impl<'a> UnwindSafe for Value<'a>
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)