pub struct PortViewDescriptor {
pub side: Option<PortViewSide>,
pub order: Option<i32>,
pub group: Option<String>,
pub anchor: Option<String>,
pub lane: Option<String>,
pub slot: Option<String>,
pub label: Option<String>,
pub icon_key: Option<String>,
pub visibility: Option<PortHandleVisibility>,
}Expand description
Renderer-neutral metadata that helps adapters place and present handles.
Fields§
§side: Option<PortViewSide>Preferred side for the handle.
order: Option<i32>Deterministic order within side/group.
group: Option<String>Optional grouping key for adapters that cluster ports.
anchor: Option<String>Optional adapter anchor id, such as a table field or form row id.
lane: Option<String>Optional lane key inside a node renderer.
slot: Option<String>Optional slot key inside a lane or anchor.
label: Option<String>Optional label override for adapter handle labels.
icon_key: Option<String>Optional adapter icon key.
visibility: Option<PortHandleVisibility>Optional handle visibility hint.
Implementations§
Source§impl PortViewDescriptor
impl PortViewDescriptor
pub fn new() -> Self
pub fn side(side: PortViewSide) -> Self
pub fn top() -> Self
pub fn right() -> Self
pub fn bottom() -> Self
pub fn left() -> Self
pub fn with_order(self, order: i32) -> Self
pub fn with_group(self, group: impl Into<String>) -> Self
pub fn with_anchor(self, anchor: impl Into<String>) -> Self
pub fn with_lane(self, lane: impl Into<String>) -> Self
pub fn with_slot(self, slot: impl Into<String>) -> Self
pub fn with_label(self, label: impl Into<String>) -> Self
pub fn with_icon_key(self, icon_key: impl Into<String>) -> Self
pub fn with_visibility(self, visibility: PortHandleVisibility) -> Self
pub fn collapsed(self) -> Self
pub fn is_visible(&self) -> bool
pub fn is_collapsed(&self) -> bool
pub fn resolved_side(&self, dir: PortDirection) -> PortViewSide
pub fn is_default(&self) -> bool
Trait Implementations§
Source§impl Clone for PortViewDescriptor
impl Clone for PortViewDescriptor
Source§fn clone(&self) -> PortViewDescriptor
fn clone(&self) -> PortViewDescriptor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PortViewDescriptor
impl Debug for PortViewDescriptor
Source§impl Default for PortViewDescriptor
impl Default for PortViewDescriptor
Source§fn default() -> PortViewDescriptor
fn default() -> PortViewDescriptor
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PortViewDescriptor
impl<'de> Deserialize<'de> for PortViewDescriptor
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for PortViewDescriptor
Source§impl PartialEq for PortViewDescriptor
impl PartialEq for PortViewDescriptor
Source§fn eq(&self, other: &PortViewDescriptor) -> bool
fn eq(&self, other: &PortViewDescriptor) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for PortViewDescriptor
impl Serialize for PortViewDescriptor
impl StructuralPartialEq for PortViewDescriptor
Auto Trait Implementations§
impl Freeze for PortViewDescriptor
impl RefUnwindSafe for PortViewDescriptor
impl Send for PortViewDescriptor
impl Sync for PortViewDescriptor
impl Unpin for PortViewDescriptor
impl UnsafeUnpin for PortViewDescriptor
impl UnwindSafe for PortViewDescriptor
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.