Enum Patch

Source
pub enum Patch {
    ElongateDomain(usize, bool, isize, bool, usize),
    ShortenDomain(usize, bool, isize, bool, usize),
    AddHelix(Helix),
    DeleteHelix(usize),
    AddStrand(usize, bool, isize),
    DeleteStrand(usize, bool, isize),
    CrossOver(usize, bool, usize, isize, bool),
    MakeBound(usize, bool, isize, usize, bool, isize),
    CutBound(usize, bool, isize, usize, bool, isize),
}
Expand description

An atomic modification of an existing design. Patches have operation to permute them or undo them.

Variants§

§

ElongateDomain(usize, bool, isize, bool, usize)

ElongateDomain(h, b1, n, b2, n2) elongate the b2 end of domain whose b2 end is (h, b1, n1) by n2 nucleotides

§

ShortenDomain(usize, bool, isize, bool, usize)

ShortenDomain(h, b1, n, b2, n2) shorten the b2 end of domain whose b2 end is (h, b1, n1) by n2 nucleotides

§

AddHelix(Helix)

AddHelix(h) add helix h

§

DeleteHelix(usize)

DeleteHelix(n) delete helix with identifier n

§

AddStrand(usize, bool, isize)

Add Strand (h, b, n) add a strand on helix b at position n on the right strand if b on the left strand otherwise

§

DeleteStrand(usize, bool, isize)

DeleteStrand(h, b, n) delete the strand containing only the nucleotide (h, b, n)

§

CrossOver(usize, bool, usize, isize, bool)

CrossOver(s, b1, h, n, b2) the b1 (5’ if true, 3’ if false) end strand s jumps to helix h at position n on the right strand if b, on the left strand otherwise

§

MakeBound(usize, bool, isize, usize, bool, isize)

MakeBound(h1, b1, n1, h2, b2, n2) Make a bound between the nucleotides (h1, b1, n1) and (h2, b2, n2)

§

CutBound(usize, bool, isize, usize, bool, isize)

CutBound(h1, b1, n1, h2, b2, n2) Cut the bound between the nucleotides (h1, b1, n1) and (h2, b2, n2)

Implementations§

Source§

impl Patch

Source

pub fn apply<S: Serialize, T: Serialize>(&self, design: &mut Design<S, T>)

Apply self on a design

Source

pub fn undo(&self) -> Self

Return the inverse of self

Trait Implementations§

Source§

impl Clone for Patch

Source§

fn clone(&self) -> Patch

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Patch

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Patch

§

impl RefUnwindSafe for Patch

§

impl Send for Patch

§

impl Sync for Patch

§

impl Unpin for Patch

§

impl UnwindSafe for Patch

Blanket Implementations§

Source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
where T: Component + Float, Swp: WhitePoint, Dwp: WhitePoint, D: AdaptFrom<S, Swp, Dwp, T>,

Source§

fn adapt_into_using<M>(self, method: M) -> D
where M: TransformMatrix<Swp, Dwp, T>,

Convert the source color to the destination color using the specified method
Source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford method by default
Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.