pub fn subtype(&self) -> Option<Subtype> {
        match *self {
            Self::Int8Array(_) => Some(Subtype::Int8),
            Self::UInt8Array(_) => Some(Subtype::UInt8),
            Self::Int16Array(_) => Some(Subtype::Int16),
            Self::UInt16Array(_) => Some(Subtype::UInt16),
            Self::Int32Array(_) => Some(Subtype::Int32),
            Self::UInt32Array(_) => Some(Subtype::UInt32),
            Self::FloatArray(_) => Some(Subtype::Float),
            _ => None,
        }
    }
/// Returns the subtype of the value.
///
/// Only arrays have subtypes.
///
/// # Examples
///
/// ```
/// use noodles_sam::record::data::field::{value::Subtype, Value};
/// assert_eq!(Value::UInt8Array(vec![0]).subtype(), Some(Subtype::UInt8));
/// assert_eq!(Value::Int(0).subtype(), None);
/// ```
Returns the subtype of the value.
Only arrays have subtypes.
Returns the subtype of the value . Only arrays have subtypes .
pub fn subtype(&self) -> Option<Subtype> {
        match *self {
            Self::Int8Array(_) => Some(Subtype::Int8),
            Self::UInt8Array(_) => Some(Subtype::UInt8),
            Self::Int16Array(_) => Some(Subtype::Int16),
            Self::UInt16Array(_) => Some(Subtype::UInt16),
            Self::Int32Array(_) => Some(Subtype::Int32),
            Self::UInt32Array(_) => Some(Subtype::UInt32),
            Self::FloatArray(_) => Some(Subtype::Float),
            _ => None,
        }
    }
pub fn subtype ( & self ) -> Option < Subtype > { match * self { Self :: Int8Array ( _ ) => Some ( Subtype :: Int8 ) , Self :: UInt8Array ( _ ) => Some ( Subtype :: UInt8 ) , Self :: Int16Array ( _ ) => Some ( Subtype :: Int16 ) , Self :: UInt16Array ( _ ) => Some ( Subtype :: UInt16 ) , Self :: Int32Array ( _ ) => Some ( Subtype :: Int32 ) , Self :: UInt32Array ( _ ) => Some ( Subtype :: UInt32 ) , Self :: FloatArray ( _ ) => Some ( Subtype :: Float ) , _ => None , } }
Returns the subtype of the value.
Returns the subtype of the value .
&self
&self
examples
```
use noodles_sam::record::data::field::{value::Subtype, Value};
assert_eq!(Value::UInt8Array(vec![0]).subtype(), Some(Subtype::UInt8));
assert_eq!(Value::Int(0).subtype(), None);
```
` ` ` use noodles_sam :: record :: data :: field :: { value :: Subtype Value } ; assert_eq! ( Value :: UInt8Array ( vec! [ 0 ] ) . subtype () Some ( Subtype :: UInt8 )) ; assert_eq! ( Value :: Int ( 0 ) . subtype () None ) ; ` ` `