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,
}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.
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 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
Mutably borrows from an owned value. Read more
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> ⓘ
Converts
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> ⓘ
Converts
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