pub struct Sample {
pub name: String,
pub is_reference: bool,
}Fields§
§name: String§is_reference: boolImplementations§
Source§impl Sample
impl Sample
pub fn select(conn: &Connection) -> SampleSelect<'_>
pub fn all(conn: &Connection) -> Result<Vec<Self>, ModelSelectError>
Source§impl Sample
impl Sample
pub const DEFAULT_NAME: &str = "reference"
pub fn get_parent_names( conn: &GraphConnection, sample_name: &str, history_ref: Option<&str>, ) -> Vec<String>
pub fn create( conn: &GraphConnection, new_sample: NewSample<'_>, ) -> Result<Sample, SampleError>
pub fn get_or_create( conn: &GraphConnection, new_sample: NewSample<'_>, ) -> Result<Sample, SampleError>
pub fn set_reference( conn: &GraphConnection, name: &str, is_reference: bool, ) -> Result<(), SampleError>
pub fn get_reference_samples( conn: &GraphConnection, history_ref: Option<&str>, ) -> Vec<Sample>
pub fn get_sample_reference_block_groups( conn: &GraphConnection, collection_name: &str, sample_name: &str, ) -> Result<Vec<BlockGroup>, SampleError>
pub fn delete_by_name(conn: &GraphConnection, name: &str)
pub fn get_graph( conn: &GraphConnection, workspace: &Workspace, collection: &str, name: &str, history_ref: Option<&str>, ) -> Result<GenGraph, SampleError>
pub fn get_all_sequences( conn: &GraphConnection, workspace: &Workspace, collection_name: &str, sample_name: &str, prune: bool, history_ref: Option<&str>, ) -> Result<HashSet<String>, SampleError>
pub fn get_or_create_child( conn: &GraphConnection, collection_name: &str, sample_name: &str, parent_samples: Vec<String>, ) -> Result<Sample, SampleError>
pub fn get_block_groups( conn: &GraphConnection, collection_name: &str, sample_name: &str, history_ref: Option<&str>, ) -> Vec<BlockGroup>
pub fn get_all_names( conn: &GraphConnection, history_ref: Option<&str>, ) -> Vec<String>
pub fn get_by_name( conn: &GraphConnection, name: &str, ) -> Result<Sample, SampleError>
pub fn search_name( conn: &GraphConnection, name: &str, history_ref: Option<&str>, ) -> Vec<Sample>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Sample
impl<'de> Deserialize<'de> for Sample
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
impl StructuralPartialEq for Sample
Auto Trait Implementations§
impl Freeze for Sample
impl RefUnwindSafe for Sample
impl Send for Sample
impl Sync for Sample
impl Unpin for Sample
impl UnsafeUnpin for Sample
impl UnwindSafe for Sample
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
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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