Skip to main content

Path

Struct Path 

Source
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: i64

Implementations§

Source§

impl Path

Source

pub fn validate_edges( conn: &GraphConnection, edge_ids: &[HashId], block_group_id: &HashId, )

Source

pub fn create( conn: &GraphConnection, name: &str, block_group_id: &HashId, edge_ids: &[HashId], ) -> Path

Source

pub fn delete(conn: &GraphConnection, name: &str, block_group_id: &HashId)

Source

pub fn get_by_id(conn: &GraphConnection, path_id: &HashId) -> Path

Source

pub fn query_for_collection( conn: &GraphConnection, collection_name: &str, ) -> Vec<Path>

Source

pub fn query_for_collection_and_sample( conn: &GraphConnection, collection_name: &str, sample_name: Option<String>, ) -> Vec<Path>

Source

pub fn sequence(&self, conn: &GraphConnection) -> String

Source

pub fn length(&self, conn: &GraphConnection) -> i64

Source

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

Source

pub fn blocks(&self, conn: &GraphConnection) -> Vec<PathBlock>

Source

pub fn intervaltree( &self, conn: &GraphConnection, ) -> IntervalTree<i64, NodeIntervalBlock>

Source

pub fn find_block_mappings( &self, conn: &GraphConnection, other_path: &Path, ) -> Vec<RangeMapping>

Source

pub fn propagate_annotation( annotation: Annotation, mapping_tree: &IntervalTree<i64, RangeMapping>, sequence_length: i64, ) -> Option<Annotation>

Source

pub fn get_mapping_tree( &self, conn: &GraphConnection, path: &Path, ) -> IntervalTree<i64, RangeMapping>

Source

pub fn propagate_annotations( &self, conn: &GraphConnection, path: &Path, annotations: Vec<Annotation>, ) -> Vec<Annotation>

Source

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

Source

pub fn new_path_with_deletion( &self, conn: &GraphConnection, deletion_start: i64, deletion_end: i64, ) -> Result<Path, QueryError>

Source

pub fn node_block_partition( &self, conn: &GraphConnection, ranges: Vec<Range>, ) -> Vec<NodeIntervalBlock>

Trait Implementations§

Source§

impl<'a> Capnp<'a> for Path

Source§

type Builder = Builder<'a>

Source§

type Reader = Reader<'a>

Source§

fn write_capnp(&self, builder: &mut Self::Builder)

Source§

fn read_capnp(reader: Self::Reader) -> Self

Source§

impl Clone for Path

Source§

fn clone(&self) -> Path

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Path

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Path

Source§

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 Hash for Path

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for Path

Source§

fn eq(&self, other: &Path) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Query for Path

Source§

const TABLE_NAME: &'static str = "paths"

Source§

type Model = Path

Source§

fn process_row(row: &Row<'_>) -> Self::Model

Source§

const PRIMARY_KEY: &'static str = "id"

Source§

fn query( conn: &Connection, query: &str, params: impl Params, ) -> Vec<Self::Model>

Source§

fn get( conn: &Connection, query: &str, params: impl Params, ) -> Result<Self::Model>

Source§

fn get_by_id<'a, T>(conn: &Connection, id: &'a T) -> Option<Self::Model>
where T: Clone + 'a, Value: From<T>,

Source§

fn query_by_ids<'a, I: ?Sized, T>( conn: &Connection, ids: &'a I, ) -> Vec<Self::Model>
where &'a I: IntoIterator<Item = &'a T>, T: Clone + 'a, Value: From<T>,

Source§

fn delete_by_ids<'a, I: ?Sized, T>( conn: &Connection, ids: &'a I, ) -> Vec<Self::Model>
where &'a I: IntoIterator<Item = &'a T>, T: Clone + 'a, Value: From<T>,

Source§

fn table_name() -> &'static str

Source§

fn all(conn: &Connection) -> Vec<Self::Model>

Source§

fn all_with_limit(conn: &Connection, limit: usize) -> Vec<Self::Model>

Source§

impl Serialize for Path

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Eq for Path

Source§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

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
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,