pub struct Reference {
pub reference_type: ReferenceType,
pub uri: NonEmptyString,
pub provider: Option<NonEmptyString>,
pub locator: Option<NonEmptyString>,
pub label: Option<NonEmptyString>,
pub observed_at: Option<IsoDateTime>,
pub proof_kind: Option<ProofKind>,
}Fields§
§reference_type: ReferenceType§uri: NonEmptyString§provider: Option<NonEmptyString>§locator: Option<NonEmptyString>§label: Option<NonEmptyString>§observed_at: Option<IsoDateTime>§proof_kind: Option<ProofKind>Implementations§
Source§impl Reference
impl Reference
Sourcepub fn with_uri(
reference_type: ReferenceType,
uri: impl Into<NonEmptyString>,
) -> Self
pub fn with_uri( reference_type: ReferenceType, uri: impl Into<NonEmptyString>, ) -> Self
A reference to an explicit URI, with no provider/locator/label/proof.
Sourcepub fn runx(reference_type: ReferenceType, id: &str) -> Self
pub fn runx(reference_type: ReferenceType, id: &str) -> Self
A reference whose URI is the canonical runx:<type>:<id> scheme.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Reference
impl<'de> Deserialize<'de> for Reference
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 Eq for Reference
Source§impl RunxSchema for Reference
impl RunxSchema for Reference
Source§fn json_schema() -> Value
fn json_schema() -> Value
The inlined JSON Schema for this type.
impl StructuralPartialEq for Reference
Auto Trait Implementations§
impl Freeze for Reference
impl RefUnwindSafe for Reference
impl Send for Reference
impl Sync for Reference
impl Unpin for Reference
impl UnsafeUnpin for Reference
impl UnwindSafe for Reference
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