pub struct Path {
pub id: HashId,
pub block_group_id: HashId,
pub name: String,
pub created_on: i64,
}Fields§
§id: HashId§block_group_id: HashId§name: String§created_on: i64Implementations§
Source§impl Path
impl Path
pub fn validate_edges( conn: &GraphConnection, edge_ids: &[HashId], block_group_id: &HashId, )
pub fn create( conn: &GraphConnection, name: &str, block_group_id: &HashId, edge_ids: &[HashId], ) -> Path
pub fn delete(conn: &GraphConnection, name: &str, block_group_id: &HashId)
pub fn get_by_id(conn: &GraphConnection, path_id: &HashId) -> Path
pub fn query_for_collection( conn: &GraphConnection, collection_name: &str, ) -> Vec<Path>
pub fn query_for_collection_and_sample( conn: &GraphConnection, collection_name: &str, sample_name: Option<String>, ) -> Vec<Path>
pub fn sequence(&self, conn: &GraphConnection) -> String
pub fn length(&self, conn: &GraphConnection) -> i64
pub fn edge_pairs_to_block( &self, block_id: i64, into: Edge, out_of: Edge, sequences_by_node_id: &HashMap<HashId, Sequence>, current_path_length: i64, ) -> PathBlock
pub fn blocks(&self, conn: &GraphConnection) -> Vec<PathBlock>
pub fn intervaltree( &self, conn: &GraphConnection, ) -> IntervalTree<i64, NodeIntervalBlock>
pub fn find_block_mappings( &self, conn: &GraphConnection, other_path: &Path, ) -> Vec<RangeMapping>
pub fn propagate_annotation( annotation: Annotation, mapping_tree: &IntervalTree<i64, RangeMapping>, sequence_length: i64, ) -> Option<Annotation>
pub fn get_mapping_tree( &self, conn: &GraphConnection, path: &Path, ) -> IntervalTree<i64, RangeMapping>
pub fn propagate_annotations( &self, conn: &GraphConnection, path: &Path, annotations: Vec<Annotation>, ) -> Vec<Annotation>
pub fn new_path_with( &self, conn: &GraphConnection, path_start: i64, path_end: i64, edge_to_new_node: &Edge, edge_from_new_node: &Edge, ) -> Path
pub fn new_path_with_deletion( &self, conn: &GraphConnection, deletion_start: i64, deletion_end: i64, ) -> Result<Path, QueryError>
pub fn node_block_partition( &self, conn: &GraphConnection, ranges: Vec<Range>, ) -> Vec<NodeIntervalBlock>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Path
impl<'de> Deserialize<'de> for Path
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 Query for Path
impl Query for Path
const TABLE_NAME: &'static str = "paths"
type Model = Path
fn process_row(row: &Row<'_>) -> Self::Model
const PRIMARY_KEY: &'static str = "id"
fn query( conn: &Connection, query: &str, params: impl Params, ) -> Vec<Self::Model>
fn get( conn: &Connection, query: &str, params: impl Params, ) -> Result<Self::Model>
fn get_by_id<'a, T>(conn: &Connection, id: &'a T) -> Option<Self::Model>
fn query_by_ids<'a, I: ?Sized, T>( conn: &Connection, ids: &'a I, ) -> Vec<Self::Model>
fn delete_by_ids<'a, I: ?Sized, T>( conn: &Connection, ids: &'a I, ) -> Vec<Self::Model>
fn table_name() -> &'static str
fn all(conn: &Connection) -> Vec<Self::Model>
fn all_with_limit(conn: &Connection, limit: usize) -> Vec<Self::Model>
impl Eq for Path
impl StructuralPartialEq for Path
Auto Trait Implementations§
impl Freeze for Path
impl RefUnwindSafe for Path
impl Send for Path
impl Sync for Path
impl Unpin for Path
impl UnsafeUnpin for Path
impl UnwindSafe for Path
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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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