[−][src]Struct seq_io::fasta::RefRecord
A FASTA record that borrows data from a buffer.
Implementations
impl<'a> RefRecord<'a>
[src]
pub fn seq_lines(&self) -> SeqLines<'_>ⓘ
[src]
Return an iterator over all sequence lines in the data
pub fn num_seq_lines(&self) -> usize
[src]
Returns the number of sequence lines.
Equivalent to self.seq_lines().len()
pub fn full_seq(&self) -> Cow<'_, [u8]>
[src]
Returns the full sequence. If the sequence consists of a single line,
then the sequence will be borrowed from the underlying buffer
(equivalent to calling RefRecord::seq()
). If there are multiple
lines, an owned copy will be created (equivalent to RefRecord::owned_seq()
).
pub fn owned_seq(&self) -> Vec<u8>
[src]
Returns the sequence as owned Vec
. Note: This function
must be called in order to obtain a sequence that does not contain
line endings (as returned by seq()
)
pub fn to_owned_record(&self) -> OwnedRecord
[src]
Creates an owned copy of the record.
pub fn write_unchanged<W: Write>(&self, writer: W) -> Result<()>
[src]
Writes a record to the given io::Write
instance
by just writing the unmodified input, which is faster than RefRecord::write
Trait Implementations
impl<'a> Clone for RefRecord<'a>
[src]
impl<'a> Debug for RefRecord<'a>
[src]
impl<'a> Record for RefRecord<'a>
[src]
fn head(&self) -> &[u8]
[src]
fn seq(&self) -> &[u8]
[src]
Return the FASTA sequence as byte slice.
Note that this method of RefRecord
returns
the raw sequence, which may contain line breaks.
Use seq_lines()
to iterate over all lines without
breaks, or use full_seq()
to access the whole sequence at once.
fn write<W: Write>(&self, writer: W) -> Result<()>
[src]
fn write_wrap<W: Write>(&self, writer: W, wrap: usize) -> Result<()>
[src]
fn id_bytes(&self) -> &[u8]
[src]
fn id(&self) -> Result<&str, Utf8Error>
[src]
fn desc_bytes(&self) -> Option<&[u8]>
[src]
fn desc(&self) -> Option<Result<&str, Utf8Error>>
[src]
fn id_desc_bytes(&self) -> (&[u8], Option<&[u8]>)
[src]
fn id_desc(&self) -> Result<(&str, Option<&str>), Utf8Error>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for RefRecord<'a>
impl<'a> Send for RefRecord<'a>
impl<'a> Sync for RefRecord<'a>
impl<'a> Unpin for RefRecord<'a>
impl<'a> UnwindSafe for RefRecord<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
const ALIGN: usize
type Init = T
The type for initializers.
unsafe fn init(init: <T as Pointable>::Init) -> usize
unsafe fn deref<'a>(ptr: usize) -> &'a T
unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
unsafe fn drop(ptr: usize)
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,