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_info(s: &str, info: &Info) -> Result<Self, ParseError>
pub fn from_str_info(s: &str, info: &Info) -> Result<Self, ParseError>
Parses a raw info field value with the given info header record.
Examples
use noodles_vcf::{header::{info::Key, Info}, record::info::field::Value};
let info = Info::from(Key::SamplesWithDataCount);
assert_eq!(Value::from_str_info("1", &info), 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 · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more