pub struct TemplateSelection {
pub id: String,
pub scope: TemplateScope,
}Expand description
Which template to resolve and the scope the caller explicitly selected.
Both are required: the ID is immutable identity (C-002) and the scope is an
explicit, visible selection (C-003/FR-005). A display name is never identity
— see resolve.
Fields§
§id: StringThe stable template ID.
scope: TemplateScopeThe scope the caller selected; must equal the template’s own scope.
Implementations§
Source§impl TemplateSelection
impl TemplateSelection
Sourcepub fn new(id: impl Into<String>, scope: TemplateScope) -> Self
pub fn new(id: impl Into<String>, scope: TemplateScope) -> Self
Build a selection from a stable ID and an explicit scope.
Trait Implementations§
Source§impl Clone for TemplateSelection
impl Clone for TemplateSelection
Source§impl Debug for TemplateSelection
impl Debug for TemplateSelection
impl Eq for TemplateSelection
Source§impl PartialEq for TemplateSelection
impl PartialEq for TemplateSelection
impl StructuralPartialEq for TemplateSelection
Auto Trait Implementations§
impl Freeze for TemplateSelection
impl RefUnwindSafe for TemplateSelection
impl Send for TemplateSelection
impl Sync for TemplateSelection
impl Unpin for TemplateSelection
impl UnsafeUnpin for TemplateSelection
impl UnwindSafe for TemplateSelection
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 more