pub struct ConnectedComponentsConfig {
pub max_graph_nodes: Option<usize>,
}Expand description
Configuration for Connected Components algorithms.
Fields§
§max_graph_nodes: Option<usize>Maximum number of nodes allowed before returning an error.
Set to None to disable the check.
Default: 10,000,000 (10M nodes)
Implementations§
Source§impl ConnectedComponentsConfig
impl ConnectedComponentsConfig
Sourcepub const fn with_max_graph_nodes(self, limit: Option<usize>) -> Self
pub const fn with_max_graph_nodes(self, limit: Option<usize>) -> Self
Set the maximum number of nodes allowed.
If the graph has more nodes than this limit, the algorithm will
return a GraphError::GraphTooLarge error instead of attempting
to allocate potentially gigabytes of memory.
Set to None to disable the check (use with caution).
Trait Implementations§
Source§impl Clone for ConnectedComponentsConfig
impl Clone for ConnectedComponentsConfig
Source§fn clone(&self) -> ConnectedComponentsConfig
fn clone(&self) -> ConnectedComponentsConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ConnectedComponentsConfig
impl Debug for ConnectedComponentsConfig
Auto Trait Implementations§
impl Freeze for ConnectedComponentsConfig
impl RefUnwindSafe for ConnectedComponentsConfig
impl Send for ConnectedComponentsConfig
impl Sync for ConnectedComponentsConfig
impl Unpin for ConnectedComponentsConfig
impl UnsafeUnpin for ConnectedComponentsConfig
impl UnwindSafe for ConnectedComponentsConfig
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