pub struct LinkBuilder { /* private fields */ }Implementations§
Source§impl LinkBuilder
impl LinkBuilder
pub fn new() -> Self
pub fn n_nodes(&self) -> usize
pub fn add_node(&mut self, node_type: NodeType) -> NodeIndex
pub fn add_crossing(&mut self, node_type: NodeType) -> NodeIndex
pub fn connect(&mut self, a: Port, b: Port)
pub fn add_loop(&mut self)
pub fn add_v_twist( &mut self, tt: NodeType, k: usize, ) -> (Port, Port, Port, Port)
pub fn add_h_twist( &mut self, tt: NodeType, k: usize, ) -> (Port, Port, Port, Port)
pub fn add_link(&mut self, l: &Link) -> Vec<NodeIndex>
pub fn disconnect(&mut self, p: Port)
pub fn edge_at(&self, p: Port) -> Option<Edge>
pub fn build(self) -> Result<Link, LinkError>
pub fn build_with<F>(self, is_incoming: F) -> Result<Link, LinkError>
pub fn is_planar(&self) -> bool
Trait Implementations§
Source§impl Debug for LinkBuilder
impl Debug for LinkBuilder
Source§impl Default for LinkBuilder
impl Default for LinkBuilder
Source§fn default() -> LinkBuilder
fn default() -> LinkBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for LinkBuilder
impl RefUnwindSafe for LinkBuilder
impl Send for LinkBuilder
impl Sync for LinkBuilder
impl Unpin for LinkBuilder
impl UnsafeUnpin for LinkBuilder
impl UnwindSafe for LinkBuilder
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> 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