[−][src]Struct codenano::Domain
A domain, i.e. an interval of a helix.
Fields
helix: isize
Index of the helix in the array of helices. Indices start at 0.
start: isize
Position of the leftmost base of this domain along the helix
(this might be the first or last base of the domain, depending
on the orientation
parameter below).
end: isize
Position of the first base after the forwardmost base of the
domain, along the helix. Domains must always be such that
domain.start < domain.end
.
forward: bool
If true, the "5' to 3'" direction of this domain runs in the same direction as the helix, i.e. "to the forward" along the axis of the helix. Else, the 5' to 3' runs to the left along the axis.
label: Option<Label>
An optional label that can be attached to strands.
sequence: Option<Cow<'static, str>>
In addition to the strand-level sequence, individual domains may have sequences too. The precedence has to be defined by the user of this library.
Implementations
impl<Label> Domain<Label>
[src]
pub fn iter(&self) -> DomainIter
[src]
Iterate through the positions of this domain, in 5' to 3' order (meaning that the values produced by this iterator might be increasing or decreasing).
pub fn translate(self, dx: isize, dy: isize) -> Self
[src]
Translate this domain. The first parameter is the translation along the helix, the second one is a translation across helices (probably most meaningful for a flat design).
pub fn shift_x(self, dx: isize) -> Self
[src]
Translate this domain along its helix.
pub fn shift_y(self, dy: isize) -> Self
[src]
Translate this domain to a different helix (probably most meaningful for a flat design).
pub fn length(&self) -> isize
[src]
Number of Nucleotides on the domain
pub fn pseudo_copy(&self) -> Self
[src]
Return a domain that has the same bounds as self
pub fn contains(&self, h: isize, x: isize, b: bool) -> bool
[src]
Return true iff self
contains the nucleotide (h, x, b)
pub fn first_nucl(&self) -> Option<(isize, isize, bool)>
[src]
Return the first nucl of self
or None
if self
is empty
pub fn last_nucl(&self) -> Option<(isize, isize, bool)>
[src]
Return the last nucl of self
or None
if self
is empty
Trait Implementations
impl<Label: Clone> Clone for Domain<Label>
[src]
impl<Label: Debug> Debug for Domain<Label>
[src]
impl<Label: Default> Default for Domain<Label>
[src]
impl<'de, Label> Deserialize<'de> for Domain<Label> where
Label: Deserialize<'de>,
[src]
Label: Deserialize<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl<Label> Serialize for Domain<Label> where
Label: Serialize,
[src]
Label: Serialize,
Auto Trait Implementations
impl<Label> RefUnwindSafe for Domain<Label> where
Label: RefUnwindSafe,
Label: RefUnwindSafe,
impl<Label> Send for Domain<Label> where
Label: Send,
Label: Send,
impl<Label> Sync for Domain<Label> where
Label: Sync,
Label: Sync,
impl<Label> Unpin for Domain<Label> where
Label: Unpin,
Label: Unpin,
impl<Label> UnwindSafe for Domain<Label> where
Label: UnwindSafe,
Label: UnwindSafe,
Blanket Implementations
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
D: AdaptFrom<S, Swp, Dwp, T>,
Dwp: WhitePoint,
Swp: WhitePoint,
T: Component + Float,
[src]
D: AdaptFrom<S, Swp, Dwp, T>,
Dwp: WhitePoint,
Swp: WhitePoint,
T: Component + Float,
fn adapt_into_using<M>(self, method: M) -> D where
M: TransformMatrix<Swp, Dwp, T>,
[src]
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into(self) -> D
[src]
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> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,