Enum noodles_sam::header::record::value::Value [−][src]
Expand description
A SAM header record value.
Variants
String(String)
A string.
Tuple Fields of String
0: String
Map(Fields)
A map of fields.
Tuple Fields of Map
0: Fields
Implementations
pub fn try_from_iter<I, K, V>(iter: I) -> Result<Self, TryFromIteratorError> where
I: IntoIterator<Item = (K, V)>,
K: Into<String>,
V: Into<String>,
pub fn try_from_iter<I, K, V>(iter: I) -> Result<Self, TryFromIteratorError> where
I: IntoIterator<Item = (K, V)>,
K: Into<String>,
V: Into<String>,
Performs a conversion from a (String, String)
iterator to a Value::Map
.
Examples
use noodles_sam::header::record::{value, Value};
let actual = Value::try_from_iter([("SN", "sq0"), ("LN", "8")])?;
let expected = Value::Map([
(String::from("SN"), String::from("sq0")),
(String::from("LN"), String::from("8")),
].into_iter().collect());
assert_eq!(actual, expected);
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Value
impl UnwindSafe for Value
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.