pub struct CanonicalProjection<'a> { /* private fields */ }Expand description
A validated semantic projection that can be consumed without text or a DOM.
Implementations§
Source§impl<'a> CanonicalProjection<'a>
impl<'a> CanonicalProjection<'a>
Sourcepub const fn structure(self) -> &'a Structure
pub const fn structure(self) -> &'a Structure
The immutable semantic structure behind this projection.
Sourcepub const fn options(self) -> &'a CifWriteOptions
pub const fn options(self) -> &'a CifWriteOptions
The explicit canonical decisions used for this projection.
Sourcepub fn sequence_references(self) -> Option<&'a SequenceReferences>
pub fn sequence_references(self) -> Option<&'a SequenceReferences>
Database sequence references retained by the structure.
Sourcepub fn atom_site_row_count(self) -> Result<usize, CifWriteError>
pub fn atom_site_row_count(self) -> Result<usize, CifWriteError>
Number of rows emitted by the atom-site category.
§Errors
Returns a range refusal if the product or ragged-model sum exceeds
usize.
Sourcepub fn carries_formal_charge(self) -> bool
pub fn carries_formal_charge(self) -> bool
Whether any atom carries a stated formal charge.
Sourcepub fn visit_atom_rows(
self,
visit: impl for<'row> FnMut(CanonicalAtomRow<'row>),
) -> Result<(), CifWriteError>
pub fn visit_atom_rows( self, visit: impl for<'row> FnMut(CanonicalAtomRow<'row>), ) -> Result<(), CifWriteError>
Visits canonical atom-site rows in deposition and model order.
The row borrows a model snapshot and is valid only for the synchronous callback. Replaying the visit is allocation-free and supports encoders that materialise only one output column at a time.
§Errors
Returns a canonical write refusal if the immutable structure cannot supply a required row identity.
Trait Implementations§
Source§impl<'a> Clone for CanonicalProjection<'a>
impl<'a> Clone for CanonicalProjection<'a>
impl<'a> Copy for CanonicalProjection<'a>
Auto Trait Implementations§
impl<'a> Freeze for CanonicalProjection<'a>
impl<'a> RefUnwindSafe for CanonicalProjection<'a>
impl<'a> Send for CanonicalProjection<'a>
impl<'a> Sync for CanonicalProjection<'a>
impl<'a> Unpin for CanonicalProjection<'a>
impl<'a> UnsafeUnpin for CanonicalProjection<'a>
impl<'a> UnwindSafe for CanonicalProjection<'a>
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