pub struct SpecRef {
pub name: String,
pub from_registry: bool,
pub effective: Option<DateTimeValue>,
}Expand description
A reference to a spec, with optional effective datetime.
For registry references the name includes the leading @ (e.g. @org/repo/spec);
for local references it is a plain base name. from_registry mirrors whether
the source used the @ qualifier.
Fields§
§name: StringSpec name as written in source. Includes @ for registry references.
from_registry: booltrue when the source used the @ qualifier (registry reference).
effective: Option<DateTimeValue>Optional effective datetime for temporal resolution.
Implementations§
Source§impl SpecRef
impl SpecRef
pub fn resolution_key(&self) -> String
Sourcepub fn at(&self, effective: &EffectiveDate) -> EffectiveDate
pub fn at(&self, effective: &EffectiveDate) -> EffectiveDate
Resolve the effective instant for this reference given the planning slice’s effective.
Explicit qualifier on the reference wins; otherwise inherits the slice instant.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SpecRef
impl<'de> Deserialize<'de> for SpecRef
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 StructuralPartialEq for SpecRef
Auto Trait Implementations§
impl Freeze for SpecRef
impl RefUnwindSafe for SpecRef
impl Send for SpecRef
impl Sync for SpecRef
impl Unpin for SpecRef
impl UnsafeUnpin for SpecRef
impl UnwindSafe for SpecRef
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.