pub struct AssetRef {
pub id: String,
pub media_type: String,
pub uri: String,
pub sha256: Option<String>,
}Expand description
Content-addressed evidence reference (DeviceRail AssetRef, spine A.8).
Never inline bytes; sha256 is the bare hex digest when present.
Fields§
§id: StringProvider-scoped asset id (e.g. sha256:<digest> or an opaque id).
media_type: StringMedia type, e.g. image/png.
uri: StringProvider URI, e.g. devicerail://assets/sha256/<digest>.
sha256: Option<String>Bare lowercase hex sha256 digest of the content, when known.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AssetRef
impl<'de> Deserialize<'de> for AssetRef
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<AssetRef, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<AssetRef, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for AssetRef
impl JsonSchema for AssetRef
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl Serialize for AssetRef
impl Serialize for AssetRef
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for AssetRef
Auto Trait Implementations§
impl Freeze for AssetRef
impl RefUnwindSafe for AssetRef
impl Send for AssetRef
impl Sync for AssetRef
impl Unpin for AssetRef
impl UnsafeUnpin for AssetRef
impl UnwindSafe for AssetRef
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