pub struct Field { /* private fields */ }
Expand description
A VCF record info field.
Implementations
Parses a raw VCF record info field.
Creates a VCF record info field.
Examples
use noodles_vcf::record::info::{field::{Key, Value}, Field};
let field = Field::new(Key::SamplesWithDataCount, Some(Value::Integer(1)));
Returns the field key.
Examples
use noodles_vcf::record::info::{field::{Key, Value}, Field};
let field = Field::new(Key::SamplesWithDataCount, Some(Value::Integer(1)));
assert_eq!(field.key(), &Key::SamplesWithDataCount);
Returns the field value.
Examples
use noodles_vcf::record::info::{field::{Key, Value}, Field};
let field = Field::new(Key::SamplesWithDataCount, Some(Value::Integer(1)));
assert_eq!(field.value(), Some(&Value::Integer(1)));
Returns a mutable reference to the value.
Examples
use noodles_vcf::record::info::{field::{Key, Value}, Field};
let mut field = Field::new(Key::SamplesWithDataCount, Some(Value::Integer(1)));
*field.value_mut() = Some(Value::Integer(2));
assert_eq!(field.value(), Some(&Value::Integer(2)));
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Field
impl UnwindSafe for Field
Blanket Implementations
Mutably borrows from an owned value. Read more