pub struct TemplateResolution { /* private fields */ }Expand description
The pure result of applying a template to user input (data-model §6).
request is present iff diagnostics is empty: a failed resolution
never yields a partial request, and the template/config it read is
untouched.
Implementations§
Source§impl TemplateResolution
impl TemplateResolution
Sourcepub fn template_id(&self) -> &str
pub fn template_id(&self) -> &str
The selected template’s stable ID (provenance, even on failure).
Sourcepub fn scope(&self) -> &TemplateScope
pub fn scope(&self) -> &TemplateScope
The resolved (explicitly selected) scope.
Sourcepub fn provided_fields(&self) -> &[String]
pub fn provided_fields(&self) -> &[String]
The create fields that received a value, in CREATE_FIELDS order.
Sourcepub fn diagnostics(&self) -> &[TemplateDiagnostic]
pub fn diagnostics(&self) -> &[TemplateDiagnostic]
Every validation diagnostic, in deterministic order.
Non-empty exactly when Self::request is None.
Sourcepub fn request(&self) -> Option<&CreateRequest>
pub fn request(&self) -> Option<&CreateRequest>
The normal create request, present only on success.
Sourcepub fn into_request(self) -> Option<CreateRequest>
pub fn into_request(self) -> Option<CreateRequest>
Consume the resolution, yielding the request when it succeeded.
Trait Implementations§
Source§impl Clone for TemplateResolution
impl Clone for TemplateResolution
Source§impl Debug for TemplateResolution
impl Debug for TemplateResolution
Source§impl Display for TemplateResolution
impl Display for TemplateResolution
impl Eq for TemplateResolution
Source§impl PartialEq for TemplateResolution
impl PartialEq for TemplateResolution
impl StructuralPartialEq for TemplateResolution
Auto Trait Implementations§
impl Freeze for TemplateResolution
impl RefUnwindSafe for TemplateResolution
impl Send for TemplateResolution
impl Sync for TemplateResolution
impl Unpin for TemplateResolution
impl UnsafeUnpin for TemplateResolution
impl UnwindSafe for TemplateResolution
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<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
Compare self to
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> ⓘ
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 moreSource§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more