Struct biodivine_sketchbook::sketchbook::data_structs::DatasetData
source · pub struct DatasetData {
pub name: String,
pub id: String,
pub annotation: String,
pub observations: Vec<ObservationData>,
pub variables: Vec<String>,
}
Expand description
Structure for sending data about Dataset
.
Some fields simplified compared to original typesafe versions (e.g., pure Strings
are used
instead of more complex typesafe structs) to allow for easier (de)serialization.
Fields§
§name: String
§id: String
§annotation: String
§observations: Vec<ObservationData>
§variables: Vec<String>
Implementations§
source§impl DatasetData
impl DatasetData
sourcepub fn from_dataset(id: &DatasetId, dataset: &Dataset) -> DatasetData
pub fn from_dataset(id: &DatasetId, dataset: &Dataset) -> DatasetData
Create new DatasetData
object given a reference to a dataset and its ID.
sourcepub fn to_dataset(&self) -> Result<Dataset, String>
pub fn to_dataset(&self) -> Result<Dataset, String>
Convert the DatasetData
to the corresponding Dataset
.
There is a syntax check just to make sure that the data are valid.
Trait Implementations§
source§impl Clone for DatasetData
impl Clone for DatasetData
source§fn clone(&self) -> DatasetData
fn clone(&self) -> DatasetData
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for DatasetData
impl Debug for DatasetData
source§impl<'de> Deserialize<'de> for DatasetData
impl<'de> Deserialize<'de> for DatasetData
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<'de> JsonSerde<'de> for DatasetData
impl<'de> JsonSerde<'de> for DatasetData
source§fn to_json_str(&self) -> String
fn to_json_str(&self) -> String
Wrapper for json serialization.
source§fn to_pretty_json_str(&self) -> String
fn to_pretty_json_str(&self) -> String
Wrapper for pretty json serialization with indentation.
source§impl PartialEq for DatasetData
impl PartialEq for DatasetData
source§impl Serialize for DatasetData
impl Serialize for DatasetData
impl StructuralPartialEq for DatasetData
Auto Trait Implementations§
impl Freeze for DatasetData
impl RefUnwindSafe for DatasetData
impl Send for DatasetData
impl Sync for DatasetData
impl Unpin for DatasetData
impl UnwindSafe for DatasetData
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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)