pub struct DNAInput {
pub id: String,
pub sequence: String,
pub modifications: Vec<Modification>,
}Expand description
A single DNA chain, optionally carrying chemical modifications.
Fields§
§id: StringChain identifier.
sequence: StringDNA nucleotide sequence (IUPAC single-letter codes).
modifications: Vec<Modification>Chemical modifications along the chain (may be empty).
Implementations§
Source§impl DNAInput
impl DNAInput
Sourcepub fn new(
id: impl Into<String>,
sequence: impl Into<String>,
) -> Result<Self, String>
pub fn new( id: impl Into<String>, sequence: impl Into<String>, ) -> Result<Self, String>
Construct a new DNAInput without modifications.
Returns Err if the sequence is empty or contains an invalid nucleotide.
Sourcepub fn with_modifications(
id: impl Into<String>,
sequence: impl Into<String>,
modifications: Vec<Modification>,
) -> Result<Self, String>
pub fn with_modifications( id: impl Into<String>, sequence: impl Into<String>, modifications: Vec<Modification>, ) -> Result<Self, String>
Construct a new DNAInput with a pre-built list of modifications.
Sourcepub fn add_modification(self, modification: Modification) -> Self
pub fn add_modification(self, modification: Modification) -> Self
Append a modification and return self (builder-style).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DNAInput
impl RefUnwindSafe for DNAInput
impl Send for DNAInput
impl Sync for DNAInput
impl Unpin for DNAInput
impl UnsafeUnpin for DNAInput
impl UnwindSafe for DNAInput
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of [
ToCompactString::to_compact_string()] Read more§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a [
CompactString]. Read more