[][src]Struct codenano::Strand

pub struct Strand<Label, DomainLabel> {
    pub domains: Vec<Domain<DomainLabel>>,
    pub sequence: Option<Cow<'static, str>>,
    pub cyclic: bool,
    pub color: Option<u32>,
    pub label: Option<Label>,
}

A DNA strand.

Fields

domains: Vec<Domain<DomainLabel>>

The (ordered) vector of domains, where each domain is a directed interval of a helix.

sequence: Option<Cow<'static, str>>

The sequence of this strand, if any. If the sequence is longer than specified by the domains, a prefix is assumed. Can be skipped in the serialisation.

cyclic: bool

Is this sequence cyclic? Can be skipped (and defaults to false) in the serialization.

color: Option<u32>

Colour of this strand. If skipped, a default colour will be chosen automatically.

label: Option<Label>

An optional label for the strand. Can be serde_json::Value::Null, and skipped in the serialisation.

Methods

impl<StrandLabel, DomainLabel> Strand<StrandLabel, DomainLabel>[src]

pub fn default_color(&self) -> u32[src]

Provide a default color to the strand.

Trait Implementations

impl<Label: Clone, DomainLabel: Clone> Clone for Strand<Label, DomainLabel>[src]

impl<Label: Default, DomainLabel: Default> Default for Strand<Label, DomainLabel>[src]

impl<Label: Debug, DomainLabel: Debug> Debug for Strand<Label, DomainLabel>[src]

impl<Label, DomainLabel> Serialize for Strand<Label, DomainLabel> where
    Label: Serialize,
    DomainLabel: Serialize
[src]

impl<'de, Label, DomainLabel> Deserialize<'de> for Strand<Label, DomainLabel> where
    Label: Deserialize<'de>,
    DomainLabel: Deserialize<'de>, 
[src]

Auto Trait Implementations

impl<Label, DomainLabel> Send for Strand<Label, DomainLabel> where
    DomainLabel: Send,
    Label: Send

impl<Label, DomainLabel> Sync for Strand<Label, DomainLabel> where
    DomainLabel: Sync,
    Label: Sync

impl<Label, DomainLabel> Unpin for Strand<Label, DomainLabel> where
    DomainLabel: Unpin,
    Label: Unpin

impl<Label, DomainLabel> UnwindSafe for Strand<Label, DomainLabel> where
    DomainLabel: UnwindSafe,
    Label: UnwindSafe

impl<Label, DomainLabel> RefUnwindSafe for Strand<Label, DomainLabel> where
    DomainLabel: RefUnwindSafe,
    Label: RefUnwindSafe

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]