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 select(conn: &Connection) -> PathSelect<'_>
pub fn all(conn: &Connection) -> Result<Vec<Self>, ModelSelectError>
Source§impl Path
impl Path
Sourcepub fn edge_ids_for_path(
conn: &GraphConnection,
path_id: &HashId,
history_ref: Option<&str>,
) -> Vec<HashId>
pub fn edge_ids_for_path( conn: &GraphConnection, path_id: &HashId, history_ref: Option<&str>, ) -> Vec<HashId>
Returns the ordered edge identifiers stored by a path at an optional history reference.
Sourcepub fn edge_id_at(
conn: &GraphConnection,
path_id: &HashId,
index: usize,
history_ref: Option<&str>,
) -> Option<HashId>
pub fn edge_id_at( conn: &GraphConnection, path_id: &HashId, index: usize, history_ref: Option<&str>, ) -> Option<HashId>
Returns one edge identifier without loading the path’s complete edge blob.
Sourcepub fn edges_for_path(
conn: &GraphConnection,
path_id: &HashId,
history_ref: Option<&str>,
) -> Vec<Edge>
pub fn edges_for_path( conn: &GraphConnection, path_id: &HashId, history_ref: Option<&str>, ) -> Vec<Edge>
Resolves the ordered edge identifiers stored by a path into edge records.
Sourcepub fn validate_edges_in_memory(
edge_ids: &[HashId],
edge_data: &[EdgeData],
) -> Result<(), PathError>
pub fn validate_edges_in_memory( edge_ids: &[HashId], edge_data: &[EdgeData], ) -> Result<(), PathError>
Validates an ordered path against its corresponding edge data.
pub fn validate_edges( conn: &GraphConnection, edge_ids: &[HashId], block_group_id: &HashId, ) -> Result<(), PathError>
pub fn create( conn: &GraphConnection, name: &str, block_group_id: &HashId, edge_ids: &[HashId], ) -> Result<Path, PathError>
Sourcepub fn create_with_validated_edges(
conn: &GraphConnection,
name: &str,
block_group_id: &HashId,
edge_ids: &[HashId],
) -> Result<Path, PathError>
pub fn create_with_validated_edges( conn: &GraphConnection, name: &str, block_group_id: &HashId, edge_ids: &[HashId], ) -> Result<Path, PathError>
Creates a path from edge identifiers previously validated in memory.
Sourcepub fn update_edges(
&self,
conn: &GraphConnection,
edge_ids: &[HashId],
) -> Result<(), PathError>
pub fn update_edges( &self, conn: &GraphConnection, edge_ids: &[HashId], ) -> Result<(), PathError>
Replaces a path’s ordered edges after validation, preserving its identity and metadata.
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: &str, ) -> Vec<Path>
pub fn sequence( &self, conn: &GraphConnection, workspace: &Workspace, history_ref: Option<&str>, ) -> Result<String, PathError>
pub fn length( &self, conn: &GraphConnection, history_ref: Option<&str>, ) -> Result<i64, PathError>
Sourcepub fn coordinate_blocks(
&self,
conn: &GraphConnection,
history_ref: Option<&str>,
) -> Vec<PathBlock>
pub fn coordinate_blocks( &self, conn: &GraphConnection, history_ref: Option<&str>, ) -> Vec<PathBlock>
Returns path blocks without loading their sequence content.
Coordinate-only consumers do not need repository access and therefore should not require a workspace merely to calculate node ranges or path length.
pub fn blocks( &self, conn: &GraphConnection, workspace: &Workspace, history_ref: Option<&str>, ) -> Result<Vec<PathBlock>, PathError>
pub fn intervaltree( &self, conn: &GraphConnection, ) -> Result<IntervalTree<i64, NodeIntervalBlock>, PathError>
pub fn find_block_mappings( &self, conn: &GraphConnection, other_path: &Path, ) -> Result<Vec<RangeMapping>, PathError>
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, ) -> Result<IntervalTree<i64, RangeMapping>, PathError>
pub fn propagate_annotations( &self, conn: &GraphConnection, path: &Path, annotations: Vec<Annotation>, ) -> Result<Vec<Annotation>, PathError>
pub fn new_path_with( &self, conn: &GraphConnection, path_start: i64, path_end: i64, edge_to_new_node: &Edge, edge_from_new_node: &Edge, ) -> Result<Path, PathError>
pub fn new_path_with_deletion( &self, conn: &GraphConnection, deletion_start: i64, deletion_end: i64, ) -> Result<Path, PathError>
pub fn node_block_partition( &self, conn: &GraphConnection, ranges: Vec<Range>, ) -> Result<Vec<NodeIntervalBlock>, PathError>
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
impl Eq for Path
Source§impl RegionResolver for Path
impl RegionResolver for Path
type Connection = GraphConnection
type Error = PathError
fn resolve( region: &Region, conn: &Self::Connection, collection_name: &str, sample_name: &str, ) -> Result<Self, RegionResolutionError<Self::Error>>
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> 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