pub struct GraphRecord { /* private fields */ }Implementations§
Source§impl GraphRecord
impl GraphRecord
pub fn new() -> Self
pub fn with_schema(schema: Schema) -> Self
pub fn with_capacity(nodes: usize, edges: usize, schema: Option<Schema>) -> Self
pub fn from_tuples( nodes: Vec<(NodeIndex, Attributes)>, edges: Option<Vec<(NodeIndex, NodeIndex, Attributes)>>, schema: Option<Schema>, ) -> GraphRecordResult<Self>
pub fn from_dataframes( nodes_dataframes: impl IntoIterator<Item = impl Into<NodeDataFrameInput>>, edges_dataframes: impl IntoIterator<Item = impl Into<EdgeDataFrameInput>>, schema: Option<Schema>, ) -> GraphRecordResult<Self>
pub fn from_nodes_dataframes( nodes_dataframes: impl IntoIterator<Item = impl Into<NodeDataFrameInput>>, schema: Option<Schema>, ) -> GraphRecordResult<Self>
pub fn to_dataframes(&self) -> GraphRecordResult<DataFramesExport>
Sourcepub const unsafe fn set_schema_unchecked(&mut self, schema: &mut Schema)
pub const unsafe fn set_schema_unchecked(&mut self, schema: &mut Schema)
§Safety
This function should only be used if the data has been validated against the schema. Using this function with invalid data may lead to undefined behavior. This function does not run any plugin hooks.
pub const fn get_schema(&self) -> &Schema
pub fn node_indices(&self) -> impl Iterator<Item = &NodeIndex>
pub fn node_attributes( &self, node_index: &NodeIndex, ) -> GraphRecordResult<&Attributes>
pub fn node_attributes_mut<'a>( &'a mut self, node_index: &'a NodeIndex, ) -> GraphRecordResult<NodeAttributesMut<'a>>
pub fn outgoing_edges( &self, node_index: &NodeIndex, ) -> GraphRecordResult<impl Iterator<Item = &EdgeIndex> + use<'_>>
pub fn incoming_edges( &self, node_index: &NodeIndex, ) -> GraphRecordResult<impl Iterator<Item = &EdgeIndex> + use<'_>>
pub fn edge_indices(&self) -> impl Iterator<Item = &EdgeIndex>
pub fn edge_attributes( &self, edge_index: &EdgeIndex, ) -> GraphRecordResult<&Attributes>
pub fn edge_attributes_mut<'a>( &'a mut self, edge_index: &'a EdgeIndex, ) -> GraphRecordResult<EdgeAttributesMut<'a>>
pub fn edge_endpoints( &self, edge_index: &EdgeIndex, ) -> GraphRecordResult<(&NodeIndex, &NodeIndex)>
pub fn edges_connecting<'a>( &'a self, outgoing_node_indices: Vec<&'a NodeIndex>, incoming_node_indices: Vec<&'a NodeIndex>, ) -> impl Iterator<Item = &'a EdgeIndex> + 'a
pub fn edges_connecting_undirected<'a>( &'a self, first_node_indices: Vec<&'a NodeIndex>, second_node_indices: Vec<&'a NodeIndex>, ) -> impl Iterator<Item = &'a EdgeIndex> + 'a
pub fn groups(&self) -> impl Iterator<Item = &Group>
pub fn nodes_in_group( &self, group: &Group, ) -> GraphRecordResult<impl Iterator<Item = &NodeIndex> + use<'_>>
pub fn ungrouped_nodes(&self) -> impl Iterator<Item = &NodeIndex>
pub fn edges_in_group( &self, group: &Group, ) -> GraphRecordResult<impl Iterator<Item = &EdgeIndex> + use<'_>>
pub fn ungrouped_edges(&self) -> impl Iterator<Item = &EdgeIndex>
pub fn groups_of_node( &self, node_index: &NodeIndex, ) -> GraphRecordResult<impl Iterator<Item = &Group> + use<'_>>
pub fn groups_of_edge( &self, edge_index: &EdgeIndex, ) -> GraphRecordResult<impl Iterator<Item = &Group> + use<'_>>
pub fn node_count(&self) -> usize
pub fn edge_count(&self) -> usize
pub fn group_count(&self) -> usize
pub fn contains_node(&self, node_index: &NodeIndex) -> bool
pub fn contains_edge(&self, edge_index: &EdgeIndex) -> bool
pub fn contains_group(&self, group: &Group) -> bool
pub fn neighbors_outgoing( &self, node_index: &NodeIndex, ) -> GraphRecordResult<impl Iterator<Item = &NodeIndex> + use<'_>>
pub fn neighbors_incoming( &self, node_index: &NodeIndex, ) -> GraphRecordResult<impl Iterator<Item = &NodeIndex> + use<'_>>
pub fn neighbors_undirected( &self, node_index: &NodeIndex, ) -> GraphRecordResult<impl Iterator<Item = &NodeIndex> + use<'_>>
pub fn query_nodes<'a, Q, R>(&'a self, query: Q) -> Selection<'a, R>
pub fn query_edges<'a, Q, R>(&'a self, query: Q) -> Selection<'a, R>
pub fn overview( &self, truncate_details: Option<usize>, ) -> GraphRecordResult<Overview>
pub fn group_overview( &self, group: &Group, truncate_details: Option<usize>, ) -> GraphRecordResult<GroupOverview>
Source§impl GraphRecord
impl GraphRecord
pub fn set_schema(&mut self, schema: Schema) -> GraphRecordResult<()>
pub const fn freeze_schema(&mut self) -> GraphRecordResult<()>
pub const fn unfreeze_schema(&mut self) -> GraphRecordResult<()>
pub fn add_node( &mut self, node_index: NodeIndex, attributes: Attributes, ) -> GraphRecordResult<()>
pub fn add_node_with_group( &mut self, node_index: NodeIndex, attributes: Attributes, group: Group, ) -> GraphRecordResult<()>
pub fn add_node_with_groups( &mut self, node_index: NodeIndex, attributes: Attributes, groups: impl AsRef<[Group]>, ) -> GraphRecordResult<()>
pub fn remove_node( &mut self, node_index: &NodeIndex, ) -> GraphRecordResult<Attributes>
pub fn add_nodes( &mut self, nodes: Vec<(NodeIndex, Attributes)>, ) -> GraphRecordResult<()>
pub fn add_nodes_with_group( &mut self, nodes: Vec<(NodeIndex, Attributes)>, group: Group, ) -> GraphRecordResult<()>
pub fn add_nodes_with_groups( &mut self, nodes: Vec<(NodeIndex, Attributes)>, groups: impl AsRef<[Group]>, ) -> GraphRecordResult<()>
pub fn add_nodes_dataframes( &mut self, nodes_dataframes: impl IntoIterator<Item = impl Into<NodeDataFrameInput>>, ) -> GraphRecordResult<()>
pub fn add_nodes_dataframes_with_group( &mut self, nodes_dataframes: impl IntoIterator<Item = impl Into<NodeDataFrameInput>>, group: Group, ) -> GraphRecordResult<()>
pub fn add_nodes_dataframes_with_groups( &mut self, nodes_dataframes: impl IntoIterator<Item = impl Into<NodeDataFrameInput>>, groups: impl AsRef<[Group]>, ) -> GraphRecordResult<()>
pub fn add_edge( &mut self, source_node_index: NodeIndex, target_node_index: NodeIndex, attributes: Attributes, ) -> GraphRecordResult<EdgeIndex>
pub fn add_edge_with_group( &mut self, source_node_index: NodeIndex, target_node_index: NodeIndex, attributes: Attributes, group: Group, ) -> GraphRecordResult<EdgeIndex>
pub fn add_edge_with_groups( &mut self, source_node_index: NodeIndex, target_node_index: NodeIndex, attributes: Attributes, groups: impl AsRef<[Group]>, ) -> GraphRecordResult<EdgeIndex>
pub fn remove_edge( &mut self, edge_index: &EdgeIndex, ) -> GraphRecordResult<Attributes>
pub fn add_edges( &mut self, edges: Vec<(NodeIndex, NodeIndex, Attributes)>, ) -> GraphRecordResult<Vec<EdgeIndex>>
pub fn add_edges_with_group( &mut self, edges: Vec<(NodeIndex, NodeIndex, Attributes)>, group: &Group, ) -> GraphRecordResult<Vec<EdgeIndex>>
pub fn add_edges_with_groups( &mut self, edges: Vec<(NodeIndex, NodeIndex, Attributes)>, groups: impl AsRef<[Group]>, ) -> GraphRecordResult<Vec<EdgeIndex>>
pub fn add_edges_dataframes( &mut self, edges_dataframes: impl IntoIterator<Item = impl Into<EdgeDataFrameInput>>, ) -> GraphRecordResult<Vec<EdgeIndex>>
pub fn add_edges_dataframes_with_group( &mut self, edges_dataframes: impl IntoIterator<Item = impl Into<EdgeDataFrameInput>>, group: &Group, ) -> GraphRecordResult<Vec<EdgeIndex>>
pub fn add_edges_dataframes_with_groups( &mut self, edges_dataframes: impl IntoIterator<Item = impl Into<EdgeDataFrameInput>>, groups: impl AsRef<[Group]>, ) -> GraphRecordResult<Vec<EdgeIndex>>
pub fn add_group( &mut self, group: Group, node_indices: Option<Vec<NodeIndex>>, edge_indices: Option<Vec<EdgeIndex>>, ) -> GraphRecordResult<()>
pub fn remove_group(&mut self, group: &Group) -> GraphRecordResult<()>
pub fn add_node_to_group( &mut self, group: Group, node_index: NodeIndex, ) -> GraphRecordResult<()>
pub fn add_node_to_groups( &mut self, groups: impl AsRef<[Group]>, node_index: NodeIndex, ) -> GraphRecordResult<()>
pub fn add_nodes_to_groups( &mut self, groups: impl AsRef<[Group]>, node_indices: Vec<NodeIndex>, ) -> GraphRecordResult<()>
pub fn add_edge_to_group( &mut self, group: Group, edge_index: EdgeIndex, ) -> GraphRecordResult<()>
pub fn add_edge_to_groups( &mut self, groups: impl AsRef<[Group]>, edge_index: EdgeIndex, ) -> GraphRecordResult<()>
pub fn add_edges_to_groups( &mut self, groups: impl AsRef<[Group]>, edge_indices: Vec<EdgeIndex>, ) -> GraphRecordResult<()>
pub fn remove_node_from_group( &mut self, group: &Group, node_index: &NodeIndex, ) -> GraphRecordResult<()>
pub fn remove_node_from_groups( &mut self, groups: impl AsRef<[Group]>, node_index: &NodeIndex, ) -> GraphRecordResult<()>
pub fn remove_nodes_from_groups( &mut self, groups: impl AsRef<[Group]>, node_indices: &[NodeIndex], ) -> GraphRecordResult<()>
pub fn remove_edge_from_group( &mut self, group: &Group, edge_index: &EdgeIndex, ) -> GraphRecordResult<()>
pub fn remove_edge_from_groups( &mut self, groups: impl AsRef<[Group]>, edge_index: &EdgeIndex, ) -> GraphRecordResult<()>
pub fn remove_edges_from_groups( &mut self, groups: impl AsRef<[Group]>, edge_indices: &[EdgeIndex], ) -> GraphRecordResult<()>
pub fn clear(&mut self) -> GraphRecordResult<()>
Trait Implementations§
Source§impl Clone for GraphRecord
impl Clone for GraphRecord
Source§fn clone(&self) -> GraphRecord
fn clone(&self) -> GraphRecord
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GraphRecord
impl Debug for GraphRecord
Source§impl Default for GraphRecord
impl Default for GraphRecord
Source§fn default() -> GraphRecord
fn default() -> GraphRecord
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for GraphRecord
impl RefUnwindSafe for GraphRecord
impl Send for GraphRecord
impl Sync for GraphRecord
impl Unpin for GraphRecord
impl UnsafeUnpin for GraphRecord
impl UnwindSafe for GraphRecord
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 moreSource§impl<T> Key for Twhere
T: Clone,
impl<T> Key for Twhere
T: Clone,
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more