pub struct HandleManager { /* private fields */ }Expand description
Handle manager for a node
Implementations§
Source§impl HandleManager
impl HandleManager
Sourcepub fn add_handle(&mut self, handle: Handle) -> Result<()>
pub fn add_handle(&mut self, handle: Handle) -> Result<()>
Add a handle
Sourcepub fn remove_handle(&mut self, handle_id: &HandleId) -> Result<Handle>
pub fn remove_handle(&mut self, handle_id: &HandleId) -> Result<Handle>
Remove a handle
Sourcepub fn get_handle(&self, handle_id: &HandleId) -> Option<&Handle>
pub fn get_handle(&self, handle_id: &HandleId) -> Option<&Handle>
Get a handle by ID
Sourcepub fn handle_at_position(
&self,
point: Position,
node_pos: Position,
node_size: Size,
handle_size: f64,
) -> Option<&Handle>
pub fn handle_at_position( &self, point: Position, node_pos: Position, node_size: Size, handle_size: f64, ) -> Option<&Handle>
Find handle at position
Sourcepub fn source_handles(&self) -> impl Iterator<Item = &Handle>
pub fn source_handles(&self) -> impl Iterator<Item = &Handle>
Get source handles
Sourcepub fn target_handles(&self) -> impl Iterator<Item = &Handle>
pub fn target_handles(&self) -> impl Iterator<Item = &Handle>
Get target handles
Sourcepub fn connection_count(&self, _handle_id: &HandleId) -> usize
pub fn connection_count(&self, _handle_id: &HandleId) -> usize
Count connections for a handle
Note: This method requires graph integration to work properly.
Use Graph::get_handle_connections() directly for accurate counting.
Sourcepub fn can_accept_connection(&self, handle_id: &HandleId) -> bool
pub fn can_accept_connection(&self, handle_id: &HandleId) -> bool
Check if handle can accept new connections
Note: This method requires graph integration to work properly.
Use Graph::can_handle_accept_connection() for accurate validation.
Trait Implementations§
Source§impl Clone for HandleManager
impl Clone for HandleManager
Source§fn clone(&self) -> HandleManager
fn clone(&self) -> HandleManager
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 HandleManager
impl Debug for HandleManager
Source§impl Default for HandleManager
impl Default for HandleManager
Source§impl PartialEq for HandleManager
impl PartialEq for HandleManager
impl StructuralPartialEq for HandleManager
Auto Trait Implementations§
impl Freeze for HandleManager
impl RefUnwindSafe for HandleManager
impl Send for HandleManager
impl Sync for HandleManager
impl Unpin for HandleManager
impl UnwindSafe for HandleManager
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