pub enum Value {
None,
Double(f64),
Long(i64),
Str(String),
Enum(u16),
DoubleArray(Arc<[f64]>),
LongArray(Arc<[i64]>),
StrArray(Arc<[String]>),
Image(Arc<Image>),
}Expand description
A PV’s value, reduced to the few shapes a display needs.
Variants§
None
No value received yet.
Double(f64)
Long(i64)
Str(String)
Enum(u16)
Index into PvState::labels.
DoubleArray(Arc<[f64]>)
LongArray(Arc<[i64]>)
StrArray(Arc<[String]>)
Image(Arc<Image>)
An areaDetector image (PVA NTNDArray).
Implementations§
Source§impl Value
impl Value
Sourcepub fn as_f64(&self) -> Option<f64>
pub fn as_f64(&self) -> Option<f64>
The value as a number, using the first element of an array.
Sourcepub fn as_long_string(&self) -> Option<String>
pub fn as_long_string(&self) -> Option<String>
A numeric array as a long string, as Phoebus shows a char waveform
whose widget format is string: see long_string.
Sourcepub fn is_numeric_array(&self) -> bool
pub fn is_numeric_array(&self) -> bool
Whether this is an array of numbers, which a long string is held in.
pub fn as_i64(&self) -> Option<i64>
Trait Implementations§
impl StructuralPartialEq for Value
Auto Trait Implementations§
impl Freeze for Value
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnsafeUnpin for Value
impl UnwindSafe for Value
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