Enum flow_expression_parser::ast::InstancePort
source · pub enum InstancePort {
Named(String),
Path(String, Vec<String>),
None,
}
Expand description
The port associated with an instance in a connection.
Variants§
Named(String)
A simple, named port.
Path(String, Vec<String>)
A named port with a path to an inner value.
None
An unnamed port that must be inferred or it’s an error.
Implementations§
source§impl InstancePort
impl InstancePort
sourcepub fn named<T: Into<String>>(name: T) -> Self
pub fn named<T: Into<String>>(name: T) -> Self
Quickly create a InstancePort::Named variant.
sourcepub fn path<T: Into<String>>(name: T, path: Vec<String>) -> Self
pub fn path<T: Into<String>>(name: T, path: Vec<String>) -> Self
Quickly create a InstancePort::Path variant.
sourcepub fn to_option_string(&self) -> Option<String>
pub fn to_option_string(&self) -> Option<String>
Convert the InstancePort to an Option
Trait Implementations§
source§impl Clone for InstancePort
impl Clone for InstancePort
source§fn clone(&self) -> InstancePort
fn clone(&self) -> InstancePort
Returns a copy 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 InstancePort
impl Debug for InstancePort
source§impl Display for InstancePort
impl Display for InstancePort
source§impl From<&String> for InstancePort
impl From<&String> for InstancePort
source§impl From<&str> for InstancePort
impl From<&str> for InstancePort
source§impl FromStr for InstancePort
impl FromStr for InstancePort
source§impl PartialEq<InstancePort> for InstancePort
impl PartialEq<InstancePort> for InstancePort
source§fn eq(&self, other: &InstancePort) -> bool
fn eq(&self, other: &InstancePort) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for InstancePort
impl Serialize for InstancePort
impl Eq for InstancePort
impl StructuralEq for InstancePort
impl StructuralPartialEq for InstancePort
Auto Trait Implementations§
impl RefUnwindSafe for InstancePort
impl Send for InstancePort
impl Sync for InstancePort
impl Unpin for InstancePort
impl UnwindSafe for InstancePort
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