pub fn build(self) -> Result<Program, BuildError> {
        let id = self.id.ok_or(BuildError::MissingId)?;

        Ok(Program {
            id,
            name: self.name,
            command_line: self.command_line,
            previous_id: self.previous_id,
            description: self.description,
            version: self.version,
            fields: self.fields,
        })
    }
/// Builds a SAM header program.
///
/// # Examples
///
/// ```
/// # use noodles_sam::header::program::builder;
/// use noodles_sam::header::Program;
/// let program = Program::builder().set_id("rg0").build()?;
/// # Ok::<(), builder::BuildError>(())
/// ```
Builds a SAM header program.
Builds a SAM header program .
pub fn build(self) -> Result<Program, BuildError> {
        let id = self.id.ok_or(BuildError::MissingId)?;
        Ok(Program {
            id,
            name: self.name,
            command_line: self.command_line,
            previous_id: self.previous_id,
            description: self.description,
            version: self.version,
            fields: self.fields,
        })
    }
pub fn build ( self ) -> Result < Program , BuildError > { let id = self . id . ok_or ( BuildError :: MissingId ) ? ; Ok ( Program { id , name : self . name , command_line : self . command_line , previous_id : self . previous_id , description : self . description , version : self . version , fields : self . fields , } ) }
Builds a SAM header program.
Builds a SAM header program .
self
self
examples
None
use noodles_sam::header::program::builder;
use noodles_sam::header::Program;
let program = Program::builder().set_id("rg0").build()?.
use noodles_sam :: header :: Program ; let program = Program :: builder () . set_id ( " rg0 " ) . build () ? .
ok::<(), builder::builderror>(())
None