pub struct Component<CT>where
CT: ComponentType,{
pub name: SmartString<LazyCompact>,
pub layer: SmartString<LazyCompact>,
/* private fields */
}
Expand description
Identifies an edge component of the graph.
Fields§
§name: SmartString<LazyCompact>
Name of the component
layer: SmartString<LazyCompact>
A layer name which allows to group different components into the same layer. Can be empty.
Implementations§
Source§impl<CT> Component<CT>where
CT: ComponentType,
impl<CT> Component<CT>where
CT: ComponentType,
pub fn new( ctype: CT, layer: SmartString<LazyCompact>, name: SmartString<LazyCompact>, ) -> Component<CT>
Trait Implementations§
Source§impl<'de, CT> Deserialize<'de> for Component<CT>where
CT: ComponentType,
impl<'de, CT> Deserialize<'de> for Component<CT>where
CT: ComponentType,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Component<CT>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Component<CT>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<CT> Display for Component<CT>where
CT: ComponentType,
impl<CT> Display for Component<CT>where
CT: ComponentType,
Source§impl<CT> FromStr for Component<CT>where
CT: ComponentType,
impl<CT> FromStr for Component<CT>where
CT: ComponentType,
Source§impl<CT> Ord for Component<CT>where
CT: Ord + ComponentType,
impl<CT> Ord for Component<CT>where
CT: Ord + ComponentType,
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<CT> PartialOrd for Component<CT>where
CT: PartialOrd + ComponentType,
impl<CT> PartialOrd for Component<CT>where
CT: PartialOrd + ComponentType,
Source§impl<CT> Serialize for Component<CT>where
CT: ComponentType,
impl<CT> Serialize for Component<CT>where
CT: ComponentType,
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<CT> Eq for Component<CT>where
CT: Eq + ComponentType,
impl<CT> StructuralPartialEq for Component<CT>where
CT: ComponentType,
Auto Trait Implementations§
impl<CT> Freeze for Component<CT>
impl<CT> RefUnwindSafe for Component<CT>where
CT: RefUnwindSafe,
impl<CT> Send for Component<CT>
impl<CT> Sync for Component<CT>
impl<CT> Unpin for Component<CT>where
CT: Unpin,
impl<CT> UnwindSafe for Component<CT>where
CT: UnwindSafe,
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> CallHasher for T
impl<T> CallHasher for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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.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