pub struct ReadOptions {
pub format: Format,
pub mode: ParseMode,
pub only_first_model: bool,
pub only_atomic_coords: bool,
pub discard_hydrogens: bool,
pub missing_element_policy: MissingElementPolicy,
pub ambiguous_residue_boundary_policy: AmbiguousResidueBoundaryPolicy,
pub limits: Limits,
pub categories: CategoryFilter,
pub input_digest: InputDigest,
}Expand description
What a read should and should not bother doing.
Fields§
§format: FormatWhich format, or automatic detection.
mode: ParseModeHow much irregularity to tolerate.
only_first_model: boolRead only the first model.
only_atomic_coords: boolRead coordinates and skip everything else.
discard_hydrogens: boolDrop hydrogens while reading.
missing_element_policy: MissingElementPolicyWhat to do when a row does not declare a valid element.
ambiguous_residue_boundary_policy: AmbiguousResidueBoundaryPolicyWhat to do when mmCIF residue identifiers do not define a boundary.
limits: LimitsCeilings that apply while reading.
categories: CategoryFilterWhich optional categories or records to read.
input_digest: InputDigestWhether to record the SHA-256 of the bytes parsed in the structure’s entry metadata; only a result certified as computed from exactly these bytes needs it.
Implementations§
Source§impl ReadOptions
impl ReadOptions
Sourcepub const fn only_first_model(self, only: bool) -> Self
pub const fn only_first_model(self, only: bool) -> Self
Reads only the first model.
Sourcepub const fn only_atomic_coords(self, only: bool) -> Self
pub const fn only_atomic_coords(self, only: bool) -> Self
Reads coordinates and skips everything else.
Sourcepub const fn missing_element_policy(self, policy: MissingElementPolicy) -> Self
pub const fn missing_element_policy(self, policy: MissingElementPolicy) -> Self
Selects an explicit policy for missing or invalid element fields.
Sourcepub const fn ambiguous_residue_boundary_policy(
self,
policy: AmbiguousResidueBoundaryPolicy,
) -> Self
pub const fn ambiguous_residue_boundary_policy( self, policy: AmbiguousResidueBoundaryPolicy, ) -> Self
Selects an explicit policy for ambiguous mmCIF residue boundaries.
Sourcepub const fn discard_hydrogens(self, discard: bool) -> Self
pub const fn discard_hydrogens(self, discard: bool) -> Self
Drops hydrogens while reading.
Sourcepub fn categories(self, categories: CategoryFilter) -> Self
pub fn categories(self, categories: CategoryFilter) -> Self
Restricts which optional categories (mmCIF/BinaryCIF) or records (PDB) are read. Names the structure cannot be built without are always read.
Sourcepub const fn digest_input(self, digest: bool) -> Self
pub const fn digest_input(self, digest: bool) -> Self
Records the SHA-256 of the bytes parsed, so a result can be tied to them.
Sourcepub fn finish(
&self,
structure: Structure,
findings: impl IntoIterator<Item = Diagnostic>,
) -> ReadResult
pub fn finish( &self, structure: Structure, findings: impl IntoIterator<Item = Diagnostic>, ) -> ReadResult
Finishes a read under this option set.
§Errors
Returns the ordered findings when at least one finding is an error under the selected parse mode.
Trait Implementations§
Source§impl Clone for ReadOptions
impl Clone for ReadOptions
Source§impl Debug for ReadOptions
impl Debug for ReadOptions
Auto Trait Implementations§
impl Freeze for ReadOptions
impl RefUnwindSafe for ReadOptions
impl Send for ReadOptions
impl Sync for ReadOptions
impl Unpin for ReadOptions
impl UnsafeUnpin for ReadOptions
impl UnwindSafe for ReadOptions
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<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