Skip to content

Commit

Permalink
docs: some minor documentation improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
johanneskoester committed Jul 6, 2021
1 parent 30c37f6 commit 24c0944
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/bcf/record.rs
Expand Up @@ -626,7 +626,7 @@ impl Record {
}
}

/// Get the number of samples.
/// Get the number of samples in the record.
pub fn sample_count(&self) -> u32 {
self.inner().n_sample()
}
Expand Down Expand Up @@ -675,6 +675,7 @@ impl Record {
}

/// Get genotypes as vector of one `Genotype` per sample.
///
/// # Example
/// Parsing genotype field (`GT` tag) from a VCF record:
/// ```
Expand All @@ -691,6 +692,8 @@ impl Record {
self.genotypes_shared_buffer(Buffer::new())
}

/// Get genotypes as vector of one `Genotype` per sample, using a given shared buffer
/// to avoid unnecessary allocations.
pub fn genotypes_shared_buffer<'a, B>(&self, buffer: B) -> Result<Genotypes<'a, B>>
where
B: BorrowMut<Buffer> + Borrow<Buffer> + 'a,
Expand Down

0 comments on commit 24c0944

Please sign in to comment.