pub struct SpecRef {
pub name: String,
pub is_registry: bool,
pub hash_pin: Option<String>,
pub effective: Option<DateTimeValue>,
}Expand description
A reference to a spec, with optional hash pin and 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. is_registry mirrors whether
the source used the @ qualifier; hash_pin pins to a specific temporal version
by content hash; effective requests temporal resolution at that datetime.
Fields§
§name: StringSpec name as written in source. Includes @ for registry references.
is_registry: booltrue when the source used the @ qualifier (registry reference).
hash_pin: Option<String>Optional content hash pin to resolve to a specific spec version.
effective: Option<DateTimeValue>Optional effective datetime for temporal resolution. When used with hash_pin, resolve by hash then verify that version was active at this datetime.
Implementations§
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>,
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
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>
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>
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.