pub struct Node {
pub id: i64,
pub sequence_hash: String,
pub hash: Option<String>,
}Fields§
§id: i64§sequence_hash: String§hash: Option<String>Implementations§
Source§impl Node
impl Node
pub fn create( conn: &Connection, sequence_hash: &str, node_hash: impl Into<Option<String>>, ) -> i64
pub fn get_nodes(conn: &Connection, node_ids: &[i64]) -> Vec<Node>
pub fn get_sequences_by_node_ids( conn: &Connection, node_ids: &[i64], ) -> HashMap<i64, Sequence>
pub fn get_id_by_hash(conn: &Connection, node_hash: &str) -> Option<i64>
pub fn is_terminal(node_id: i64) -> bool
pub fn is_start_node(node_id: i64) -> bool
pub fn is_end_node(node_id: i64) -> bool
pub fn get_start_node() -> Node
pub fn get_end_node() -> Node
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Node
impl<'de> Deserialize<'de> for Node
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
Auto Trait Implementations§
impl Freeze for Node
impl RefUnwindSafe for Node
impl Send for Node
impl Sync for Node
impl Unpin for Node
impl UnwindSafe for Node
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<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