pub struct TemplateView<'a> { /* private fields */ }Expand description
Lightweight wrapper granting read-only access to a stored template.
Implementations§
Source§impl<'a> TemplateView<'a>
impl<'a> TemplateView<'a>
Sourcepub fn new(inner: &'a InternalTemplate) -> Self
pub fn new(inner: &'a InternalTemplate) -> Self
Creates a new view from the internal store entry.
§Arguments
inner- Reference to the cached template.
Sourcepub fn standard_name(&self) -> StandardResidue
pub fn standard_name(&self) -> StandardResidue
Reports the standard residue enum associated with the template.
§Returns
The StandardResidue discriminant stored in metadata.
Sourcepub fn heavy_atoms(&self) -> impl Iterator<Item = (&'a str, Element, Point)>
pub fn heavy_atoms(&self) -> impl Iterator<Item = (&'a str, Element, Point)>
Iterates heavy atoms with their elements and reference coordinates.
§Returns
An iterator yielding (name, element, Point) tuples preserving declaration order.
Trait Implementations§
Source§impl<'a> Clone for TemplateView<'a>
impl<'a> Clone for TemplateView<'a>
Source§fn clone(&self) -> TemplateView<'a>
fn clone(&self) -> TemplateView<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for TemplateView<'a>
impl<'a> Debug for TemplateView<'a>
impl<'a> Copy for TemplateView<'a>
Auto Trait Implementations§
impl<'a> Freeze for TemplateView<'a>
impl<'a> RefUnwindSafe for TemplateView<'a>
impl<'a> Send for TemplateView<'a>
impl<'a> Sync for TemplateView<'a>
impl<'a> Unpin for TemplateView<'a>
impl<'a> UnwindSafe for TemplateView<'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
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<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.