pub fn write_file_header(&mut self, header: &sam::Header) -> io::Result<()> {
        Container::try_from(header)
            .map_err(|e| io::Error::new(io::ErrorKind::InvalidInput, e))
            .and_then(|container| write_container(&mut self.inner, &container))
    }
/// Writes a CRAM file header container.
///
/// The position of the stream is expected to be directly after the file definition.
///
/// Reference sequence dictionary entries must have MD5 checksums (`M5`) set.
///
/// # Examples
///
/// ```
/// # use std::io;
/// use noodles_cram as cram;
/// use noodles_sam as sam;
///
/// let mut writer = cram::Writer::new(Vec::new(), Vec::new());
/// writer.write_file_definition()?;
///
/// let header = sam::Header::default();
/// writer.write_file_header(&header)?;
/// # Ok::<(), io::Error>(())
/// ```
Writes a CRAM file header container.
The position of the stream is expected to be directly after the file definition.

Reference sequence dictionary entries must have MD5 checksums (`M5`) set.
Writes a CRAM file header container . The position of the stream is expected to be directly after the file definition . Reference sequence dictionary entries must have MD5 checksums ( ` M5 ` ) set .
pub fn write_file_header(&mut self, header: &sam::Header) -> io::Result<()> {
        Container::try_from(header)
            .map_err(|e| io::Error::new(io::ErrorKind::InvalidInput, e))
            .and_then(|container| write_container(&mut self.inner, &container))
    }
pub fn write_file_header ( & mut self , header : & sam :: Header ) -> io :: Result < ( ) > { Container :: try_from ( header ) . map_err ( | e | io :: Error :: new ( io :: ErrorKind :: InvalidInput , e ) ) . and_then ( | container | write_container ( & mut self . inner , & container ) ) }
Writes a CRAM file header container.
Writes a CRAM file header container .
&mut self
header
&sam::Header
&mut self
header
&sam::Header
examples
None
use std::io;
use noodles_cram as cram;
use noodles_sam as sam.

let mut writer = cram::Writer::new(Vec::new(), Vec::new());
writer.write_file_definition()?.

let header = sam::Header::default();
writer.write_file_header(&header)?.
use noodles_cram as cram ; use noodles_sam as sam . let mut writer = cram :: Writer :: new ( Vec :: new () Vec :: new () ) ; writer . write_file_definition () ? . let header = sam :: Header :: default () ; writer . write_file_header ( &header ) ? .
ok::<(), io::error>(())
None