#[non_exhaustive]pub enum Format {
Auto,
Mmcif,
Pdbml,
BinaryCif,
Mmtf,
Pdb,
Pqr,
Pdbqt,
}Expand description
A format molframe can read or write.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Auto
Decide from the content, then from the file name.
Mmcif
The archive’s structured text format.
Pdbml
XML serialization of the PDBx data model.
BinaryCif
The archive’s MessagePack-based binary format.
Mmtf
The deprecated but still encountered macromolecular transmission format.
Pdb
The legacy fixed-column format.
Pqr
PDB-shaped coordinates carrying partial charge and radius.
Pdbqt
AutoDock’s PDB-shaped coordinates carrying charge and atom type.
Implementations§
Source§impl Format
impl Format
Sourcepub const fn extensions(self) -> &'static [&'static str]
pub const fn extensions(self) -> &'static [&'static str]
The file suffixes conventionally used for this format.
Sourcepub fn parse(name: &str) -> Option<Self>
pub fn parse(name: &str) -> Option<Self>
Parses a format name without allocating a normalized copy.
Sourcepub fn recognises(self, bytes: &[u8]) -> bool
pub fn recognises(self, bytes: &[u8]) -> bool
Returns true when this format’s content is recognisable in bytes.
Sourcepub fn detect(
requested: Self,
input: &InputBuffer,
name: Option<&str>,
) -> Result<Self, Diagnostic>
pub fn detect( requested: Self, input: &InputBuffer, name: Option<&str>, ) -> Result<Self, Diagnostic>
Decides the format of input, given what the caller asked for and the
name the bytes came from.
§Errors
Returns a diagnostic when neither content nor the optional name identifies a supported format.
Trait Implementations§
impl Copy for Format
impl Eq for Format
impl StructuralPartialEq for Format
Auto Trait Implementations§
impl Freeze for Format
impl RefUnwindSafe for Format
impl Send for Format
impl Sync for Format
impl Unpin for Format
impl UnsafeUnpin for Format
impl UnwindSafe for Format
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
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> ⓘ
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> ⓘ
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