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 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 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 for InstancePort
impl PartialEq for InstancePort
Source§impl Serialize for InstancePort
impl Serialize for InstancePort
impl Eq for InstancePort
impl StructuralPartialEq for InstancePort
Auto Trait Implementations§
impl Freeze for InstancePort
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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