pub struct HostPort<'a> { /* private fields */ }Expand description
A single graph->host port, providing typed polling and convenience helpers.
Implementations§
Source§impl<'a> HostPort<'a>
impl<'a> HostPort<'a>
pub fn name(&self) -> &'a str
Sourcepub fn resolved_type(&self) -> Option<&'a TypeExpr>
pub fn resolved_type(&self) -> Option<&'a TypeExpr>
The resolved graph->host port type (after planner inference), if known.
Sourcepub fn can_type_to<T: HostPollable>(&self) -> bool
pub fn can_type_to<T: HostPollable>(&self) -> bool
Alias for can_poll (terminology: “can this port be typed/popped as T?”).
Sourcepub fn can_poll<T: HostPollable>(&self) -> bool
pub fn can_poll<T: HostPollable>(&self) -> bool
Returns true if this port can be pulled as T without additional user glue.
pub fn is_type_expr(&self, ty: &TypeExpr) -> bool
Trait Implementations§
Source§impl<'a> HostValuePort for HostPort<'a>
impl<'a> HostValuePort for HostPort<'a>
impl<'a> Copy for HostPort<'a>
Auto Trait Implementations§
impl<'a> Freeze for HostPort<'a>
impl<'a> RefUnwindSafe for HostPort<'a>
impl<'a> Send for HostPort<'a>
impl<'a> Sync for HostPort<'a>
impl<'a> Unpin for HostPort<'a>
impl<'a> UnwindSafe for HostPort<'a>
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