pub struct AtomName(pub [u8; 4]);Expand description
Internally, an AtomName is represented as an array of 4 bytes.
For convinience, FromStr is implemented for AtomName, so you can:
use std::str::FromStr;
use protein_core::structure::AtomName;
let atom = AtomName::from_str("O2").unwrap();
assert_eq!(atom, AtomName([b'O', b'2', b' ', b' ']));Tuple Fields§
§0: [u8; 4]Trait Implementations§
Source§impl Serialize for AtomName
impl Serialize for AtomName
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 Eq for AtomName
impl StructuralPartialEq for AtomName
Auto Trait Implementations§
impl Freeze for AtomName
impl RefUnwindSafe for AtomName
impl Send for AtomName
impl Sync for AtomName
impl Unpin for AtomName
impl UnsafeUnpin for AtomName
impl UnwindSafe for AtomName
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