[][src]Trait preexplorer::traits::Saveable

pub trait Saveable: Configurable {
    fn plotable_data(&self) -> String;

    fn save(&self) -> Result<&Self, PreexplorerError> { ... }
fn save_with_id<S: Display>(&self, id: S) -> Result<&Self, PreexplorerError> { ... } }

Allows quick saving.

Implementation

See traits module level documentation.

Required methods

fn plotable_data(&self) -> String

Extract the data from the struct.

Warnings

If there is no data, a warning will be printed to io::stderr.

Loading content...

Provided methods

fn save(&self) -> Result<&Self, PreexplorerError>

Save the file. The directory is target\\preexplorer\\data\\.

Panics

If the struct has not been given an id, according to the Configurable trait.

Examples

Correctly identifying before saving.

let mut seq = (0..10).preexplore();
seq.set_id("my_id").save().unwrap();

Incorrectly identifying before saving. This panics.

This example panics
(0..10).preexplore().save();

fn save_with_id<S: Display>(&self, id: S) -> Result<&Self, PreexplorerError>

Save the file with a given id. It does not change the current id to save the data.

Examples

Quickly saving.

let mut seq = (0..10).preexplore();
seq.save_with_id("quick_test").unwrap();
assert_eq!(seq.id(), None);
Loading content...

Implementors

impl Saveable for SequenceError[src]

impl Saveable for SequenceErrors[src]

impl<T> Saveable for Data<T> where
    T: Display + Clone
[src]

impl<T> Saveable for Densities<T> where
    T: Display + Clone
[src]

impl<T> Saveable for Density<T> where
    T: Display + Clone
[src]

impl<T> Saveable for ProcessError<T> where
    T: Display + Clone
[src]

impl<T> Saveable for ProcessErrors<T> where
    T: Display + Clone
[src]

impl<T> Saveable for Sequence<T> where
    T: Display + Clone
[src]

impl<T> Saveable for SequenceBin<T> where
    T: Display + Clone
[src]

impl<T> Saveable for SequenceBins<T> where
    T: Display + Clone
[src]

impl<T> Saveable for SequenceViolin<T> where
    T: Display + Clone
[src]

impl<T> Saveable for SequenceViolins<T> where
    T: Display + Clone
[src]

impl<T> Saveable for Sequences<T> where
    T: Display + Clone
[src]

impl<T, S> Saveable for Process<T, S> where
    T: Display + Clone,
    S: Display + Clone
[src]

impl<T, S> Saveable for ProcessBin<T, S> where
    T: Display + Clone,
    S: Display + Clone
[src]

impl<T, S> Saveable for ProcessBins<T, S> where
    T: Display + Clone,
    S: Display + Clone
[src]

impl<T, S> Saveable for ProcessViolin<T, S> where
    T: Display + Clone,
    S: Display + Clone
[src]

impl<T, S> Saveable for ProcessViolins<T, S> where
    T: Display + Clone,
    S: Display + Clone
[src]

impl<T, S> Saveable for Processes<T, S> where
    T: Display + Clone,
    S: Display + Clone
[src]

impl<T, S, U> Saveable for Heatmap<T, S, U> where
    T: Display + Clone,
    S: Display + Clone,
    U: Display + Clone
[src]

impl<T, S, U> Saveable for Heatmaps<T, S, U> where
    T: Display + Clone,
    S: Display + Clone,
    U: Display + Clone
[src]

Loading content...