#[non_exhaustive]pub enum PropertyValue {
Command,
Bool(bool),
Int(i64),
Float(f64),
Unsigned(u64),
PixelFmt(GenCamPixelBpp),
Duration(Duration),
EnumStr(String),
}Expand description
A property value
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Command
A command
Bool(bool)
A boolean value
Int(i64)
An integer value
Float(f64)
A floating point value
Unsigned(u64)
An unsigned integer value
PixelFmt(GenCamPixelBpp)
A pixel format value
Duration(Duration)
A duration value
EnumStr(String)
An enum string value
Implementations§
Source§impl PropertyValue
impl PropertyValue
Sourcepub fn get_type(&self) -> PropertyType
pub fn get_type(&self) -> PropertyType
Get the type of the property value
Source§impl PropertyValue
impl PropertyValue
Sourcepub fn as_duration(&self) -> Option<Duration>
pub fn as_duration(&self) -> Option<Duration>
Get the value as a duration
Sourcepub fn as_pixel_fmt(&self) -> Option<GenCamPixelBpp>
pub fn as_pixel_fmt(&self) -> Option<GenCamPixelBpp>
Get the value as a pixel format
Sourcepub fn as_enum_str(&self) -> Option<&str>
pub fn as_enum_str(&self) -> Option<&str>
Get the value as an enum string
Trait Implementations§
Source§impl Clone for PropertyValue
impl Clone for PropertyValue
Source§fn clone(&self) -> PropertyValue
fn clone(&self) -> PropertyValue
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 PropertyValue
impl Debug for PropertyValue
Source§impl<'de> Deserialize<'de> for PropertyValue
impl<'de> Deserialize<'de> for PropertyValue
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&PropertyValue> for PropertyType
impl From<&PropertyValue> for PropertyType
Source§fn from(prop: &PropertyValue) -> Self
fn from(prop: &PropertyValue) -> Self
Converts to this type from the input type.
Source§impl From<&str> for PropertyValue
impl From<&str> for PropertyValue
Source§impl From<()> for PropertyValue
impl From<()> for PropertyValue
Source§impl From<Duration> for PropertyValue
impl From<Duration> for PropertyValue
Source§impl From<GenCamPixelBpp> for PropertyValue
impl From<GenCamPixelBpp> for PropertyValue
Source§fn from(val: GenCamPixelBpp) -> Self
fn from(val: GenCamPixelBpp) -> Self
Converts to this type from the input type.
Source§impl From<PropertyValue> for GenSrvValue
Available on crate feature server only.
impl From<PropertyValue> for GenSrvValue
Available on crate feature
server only.Source§fn from(value: PropertyValue) -> Self
fn from(value: PropertyValue) -> Self
Converts to this type from the input type.
Source§impl From<String> for PropertyValue
impl From<String> for PropertyValue
Source§impl From<bool> for PropertyValue
impl From<bool> for PropertyValue
Source§impl From<f64> for PropertyValue
impl From<f64> for PropertyValue
Source§impl From<i64> for PropertyValue
impl From<i64> for PropertyValue
Source§impl From<u64> for PropertyValue
impl From<u64> for PropertyValue
Source§impl PartialEq for PropertyValue
impl PartialEq for PropertyValue
Source§impl PartialOrd for PropertyValue
impl PartialOrd for PropertyValue
Source§impl Serialize for PropertyValue
impl Serialize for PropertyValue
Source§impl TryFrom<&PropertyValue> for ()
impl TryFrom<&PropertyValue> for ()
Source§type Error = PropertyError
type Error = PropertyError
The type returned in the event of a conversion error.
Source§impl TryFrom<&PropertyValue> for Duration
impl TryFrom<&PropertyValue> for Duration
Source§type Error = PropertyError
type Error = PropertyError
The type returned in the event of a conversion error.
Source§impl TryFrom<&PropertyValue> for GenCamPixelBpp
impl TryFrom<&PropertyValue> for GenCamPixelBpp
Source§type Error = PropertyError
type Error = PropertyError
The type returned in the event of a conversion error.
Source§impl TryFrom<&PropertyValue> for String
impl TryFrom<&PropertyValue> for String
Source§type Error = PropertyError
type Error = PropertyError
The type returned in the event of a conversion error.
Source§impl TryFrom<&PropertyValue> for bool
impl TryFrom<&PropertyValue> for bool
Source§type Error = PropertyError
type Error = PropertyError
The type returned in the event of a conversion error.
Source§impl TryFrom<&PropertyValue> for f64
impl TryFrom<&PropertyValue> for f64
Source§type Error = PropertyError
type Error = PropertyError
The type returned in the event of a conversion error.
Source§impl TryFrom<&PropertyValue> for i64
impl TryFrom<&PropertyValue> for i64
Source§type Error = PropertyError
type Error = PropertyError
The type returned in the event of a conversion error.
Source§impl TryFrom<&PropertyValue> for u64
impl TryFrom<&PropertyValue> for u64
Source§type Error = PropertyError
type Error = PropertyError
The type returned in the event of a conversion error.
Source§impl TryFrom<PropertyValue> for ()
impl TryFrom<PropertyValue> for ()
Source§type Error = PropertyError
type Error = PropertyError
The type returned in the event of a conversion error.
Source§impl TryFrom<PropertyValue> for Duration
impl TryFrom<PropertyValue> for Duration
Source§type Error = PropertyError
type Error = PropertyError
The type returned in the event of a conversion error.
Source§impl TryFrom<PropertyValue> for GenCamPixelBpp
impl TryFrom<PropertyValue> for GenCamPixelBpp
Source§type Error = PropertyError
type Error = PropertyError
The type returned in the event of a conversion error.
Source§impl TryFrom<PropertyValue> for String
impl TryFrom<PropertyValue> for String
Source§type Error = PropertyError
type Error = PropertyError
The type returned in the event of a conversion error.
Source§impl TryFrom<PropertyValue> for bool
impl TryFrom<PropertyValue> for bool
Source§type Error = PropertyError
type Error = PropertyError
The type returned in the event of a conversion error.
Source§impl TryFrom<PropertyValue> for f64
impl TryFrom<PropertyValue> for f64
Source§type Error = PropertyError
type Error = PropertyError
The type returned in the event of a conversion error.
Source§impl TryFrom<PropertyValue> for i64
impl TryFrom<PropertyValue> for i64
Source§type Error = PropertyError
type Error = PropertyError
The type returned in the event of a conversion error.
Source§impl TryFrom<PropertyValue> for u64
impl TryFrom<PropertyValue> for u64
Source§type Error = PropertyError
type Error = PropertyError
The type returned in the event of a conversion error.
impl StructuralPartialEq for PropertyValue
Auto Trait Implementations§
impl Freeze for PropertyValue
impl RefUnwindSafe for PropertyValue
impl Send for PropertyValue
impl Sync for PropertyValue
impl Unpin for PropertyValue
impl UnwindSafe for PropertyValue
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