pub struct Resolved<T>where
T: Clone,{
pub value: T,
pub origin: ResolvedOrigin,
}Expand description
A value plus the rule that produced it.
Use Resolved::is_explicit to branch: explicit author intent
(frontmatter or cascade) survives downstream overrides; auto-detected
defaults can be replaced.
Fields§
§value: T§origin: ResolvedOriginImplementations§
Source§impl<T: Clone> Resolved<T>
impl<T: Clone> Resolved<T>
pub fn frontmatter(value: T) -> Self
pub fn cascade(value: T) -> Self
pub fn auto(value: T) -> Self
Sourcepub fn is_explicit(&self) -> bool
pub fn is_explicit(&self) -> bool
True iff origin is ResolvedOrigin::Frontmatter or
ResolvedOrigin::Cascade — i.e. some author (current doc or
ancestor) explicitly set this value, as opposed to the build
pipeline auto-deriving it.
Trait Implementations§
Source§impl<'de, T> Deserialize<'de> for Resolved<T>where
T: Clone + Deserialize<'de>,
impl<'de, T> Deserialize<'de> for Resolved<T>where
T: Clone + Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<T> StructuralPartialEq for Resolved<T>
Auto Trait Implementations§
impl<T> Freeze for Resolved<T>where
T: Freeze,
impl<T> RefUnwindSafe for Resolved<T>where
T: RefUnwindSafe,
impl<T> Send for Resolved<T>where
T: Send,
impl<T> Sync for Resolved<T>where
T: Sync,
impl<T> Unpin for Resolved<T>where
T: Unpin,
impl<T> UnsafeUnpin for Resolved<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Resolved<T>where
T: UnwindSafe,
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