pub enum Value {
Integer(i32),
Float(f32),
Flag,
Character(char),
String(String),
Array(Array),
}
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.
Array(Array)
An array.
Implementations§
source§impl Value
impl Value
sourcepub fn from_str_info(s: &str, info: &Map<Info>) -> Result<Self, ParseError>
pub fn from_str_info(s: &str, info: &Map<Info>) -> Result<Self, ParseError>
Parses a raw info field value with the given info header record.
Examples
use noodles_vcf::{
header::record::value::{map::Info, Map},
record::info::field::{key, Value},
};
let info = Map::<Info>::from(&key::SAMPLES_WITH_DATA_COUNT);
assert_eq!(Value::from_str_info("1", &info), Ok(Value::Integer(1)));
Trait Implementations§
source§impl PartialEq for Value
impl PartialEq for Value
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§
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