pub enum Value {
Integer(i32),
Float(f32),
Flag,
Character(char),
String(String),
IntegerArray(Vec<Option<i32>>),
FloatArray(Vec<Option<f32>>),
CharacterArray(Vec<Option<char>>),
StringArray(Vec<Option<String>>),
}
Expand description
A VCF record info field value.
Variants
Integer(i32)
An 32-bit integer.
Float(f32)
A single-precision floating-point.
Flag
A boolean.
Character(char)
A character.
String(String)
A string.
IntegerArray(Vec<Option<i32>>)
An array of 32-bit integers.
FloatArray(Vec<Option<f32>>)
An array of single-precision floating-points.
CharacterArray(Vec<Option<char>>)
An array of characters.
StringArray(Vec<Option<String>>)
An array of strings.
Implementations
sourceimpl Value
impl Value
sourcepub fn from_str_key(s: &str, key: &Key) -> Result<Self, ParseError>
pub fn from_str_key(s: &str, key: &Key) -> Result<Self, ParseError>
Parses a raw info field value for the given key.
Examples
use noodles_vcf::record::info::field::{Key, Value};
assert_eq!(Value::from_str_key("1", &Key::SamplesWithDataCount), Ok(Value::Integer(1)));
Trait Implementations
impl StructuralPartialEq for Value
Auto Trait Implementations
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnwindSafe for Value
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more