#[repr(u8)]pub enum GraphBondOrder {
Single = 1,
Double = 2,
Triple = 3,
Aromatic = 4,
}Expand description
Describes the discrete bond multiplicities supported in input graphs.
The values intentionally match their valence contribution so that helpers like
electron counting can treat Single as 1, Double as 2, etc. This enum
includes aromatic bonds for input parsing.
Variants§
Single = 1
A single bond contributing one unit of valence.
Double = 2
A double bond contributing two units of valence.
Triple = 3
A triple bond contributing three units of valence.
Aromatic = 4
A Kekulé-aromatic bond that gets expanded during perception.
Trait Implementations§
Source§impl Clone for GraphBondOrder
impl Clone for GraphBondOrder
Source§fn clone(&self) -> GraphBondOrder
fn clone(&self) -> GraphBondOrder
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 GraphBondOrder
impl Debug for GraphBondOrder
Source§impl Display for GraphBondOrder
impl Display for GraphBondOrder
Source§impl FromStr for GraphBondOrder
impl FromStr for GraphBondOrder
Source§fn from_str(s: &str) -> Result<Self, Self::Err>
fn from_str(s: &str) -> Result<Self, Self::Err>
Parses a textual bond order into the GraphBondOrder enum.
Accepts the canonical variant names ("Single", "Double", etc.).
§Errors
Returns ParseBondOrderError if the string is not one of the supported
keywords.
Source§type Err = ParseBondOrderError
type Err = ParseBondOrderError
The associated error which can be returned from parsing.
Source§impl Hash for GraphBondOrder
impl Hash for GraphBondOrder
Source§impl Ord for GraphBondOrder
impl Ord for GraphBondOrder
Source§fn cmp(&self, other: &GraphBondOrder) -> Ordering
fn cmp(&self, other: &GraphBondOrder) -> Ordering
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 PartialEq for GraphBondOrder
impl PartialEq for GraphBondOrder
Source§impl PartialOrd for GraphBondOrder
impl PartialOrd for GraphBondOrder
impl Copy for GraphBondOrder
impl Eq for GraphBondOrder
impl StructuralPartialEq for GraphBondOrder
Auto Trait Implementations§
impl Freeze for GraphBondOrder
impl RefUnwindSafe for GraphBondOrder
impl Send for GraphBondOrder
impl Sync for GraphBondOrder
impl Unpin for GraphBondOrder
impl UnwindSafe for GraphBondOrder
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