pub trait InputProps {
type Reader;
type Writer: Clone;
Show 17 methods
// Required methods
fn name(&self) -> &str;
fn kind(&self) -> &HaystackKind;
fn block_id(&self) -> &Uuid;
fn is_connected(&self) -> bool;
fn links(&self) -> Vec<&dyn Link>;
fn add_link(&mut self, link: BaseLink<Self::Writer>);
fn remove_link_by_id(&mut self, link_id: &Uuid);
fn remove_target_block_links(&mut self, block_id: &Uuid);
fn remove_all_links(&mut self);
fn default(&self) -> &InputDefault;
fn reader(&mut self) -> &mut Self::Reader;
fn writer(&mut self) -> &mut Self::Writer;
fn get_value(&self) -> Option<&Value>;
fn increment_conn(&mut self) -> usize;
fn decrement_conn(&mut self) -> usize;
// Provided methods
fn has_output(&self) -> bool { ... }
fn remove_link(&mut self, link: &dyn Link) { ... }
}Expand description
Defines the basic properties of a Block Input
Required Associated Types§
Required Methods§
Sourcefn kind(&self) -> &HaystackKind
fn kind(&self) -> &HaystackKind
The kind of data this input can receive
Sourcefn is_connected(&self) -> bool
fn is_connected(&self) -> bool
True if this input is connected to at least one output or input of another block
Sourcefn remove_link_by_id(&mut self, link_id: &Uuid)
fn remove_link_by_id(&mut self, link_id: &Uuid)
Sourcefn remove_target_block_links(&mut self, block_id: &Uuid)
fn remove_target_block_links(&mut self, block_id: &Uuid)
Remove all links to a specific block from this input
Sourcefn remove_all_links(&mut self)
fn remove_all_links(&mut self)
Remove all links from this input
Sourcefn default(&self) -> &InputDefault
fn default(&self) -> &InputDefault
This input’s defaults
Sourcefn increment_conn(&mut self) -> usize
fn increment_conn(&mut self) -> usize
Increment the connection count when this input is linked to another block’s output.
Sourcefn decrement_conn(&mut self) -> usize
fn decrement_conn(&mut self) -> usize
Decrement the connection count when the link to another block output is removed.
Provided Methods§
Sourcefn has_output(&self) -> bool
fn has_output(&self) -> bool
True if this input has at least one output