Struct AtomConnection
pub struct AtomConnection {
pub from: AtomIndex,
pub to: AtomIndex,
pub order: Option<u8>,
}Expand description
A simple connection between explicit atoms.
Fields§
§from: AtomIndexThe source atom index.
to: AtomIndexThe target atom index.
order: Option<u8>Optional connection order. This crate does not assign bonding semantics to the value.
Implementations§
§impl AtomConnection
impl AtomConnection
pub fn new(
from: AtomIndex,
to: AtomIndex,
order: Option<u8>,
) -> Result<AtomConnection, MoleculeValidationError>
pub fn new( from: AtomIndex, to: AtomIndex, order: Option<u8>, ) -> Result<AtomConnection, MoleculeValidationError>
Creates an atom connection.
§Errors
Returns MoleculeValidationError::SelfConnection when from equals to, or
MoleculeValidationError::ZeroConnectionOrder when order is Some(0).
Trait Implementations§
§impl Clone for AtomConnection
impl Clone for AtomConnection
§fn clone(&self) -> AtomConnection
fn clone(&self) -> AtomConnection
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 more§impl Debug for AtomConnection
impl Debug for AtomConnection
§impl Display for AtomConnection
impl Display for AtomConnection
§impl Hash for AtomConnection
impl Hash for AtomConnection
§impl Ord for AtomConnection
impl Ord for AtomConnection
§impl PartialEq for AtomConnection
impl PartialEq for AtomConnection
§impl PartialOrd for AtomConnection
impl PartialOrd for AtomConnection
impl Copy for AtomConnection
impl Eq for AtomConnection
impl StructuralPartialEq for AtomConnection
Auto Trait Implementations§
impl Freeze for AtomConnection
impl RefUnwindSafe for AtomConnection
impl Send for AtomConnection
impl Sync for AtomConnection
impl Unpin for AtomConnection
impl UnsafeUnpin for AtomConnection
impl UnwindSafe for AtomConnection
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