pub struct TufRepo {
pub file_name: String,
pub hash: String,
pub system_version: TufRepoSystemVersion,
pub time_created: DateTime<Utc>,
}Expand description
Metadata about a TUF repository
JSON schema
{
"description": "Metadata about a TUF repository",
"type": "object",
"required": [
"file_name",
"hash",
"system_version",
"time_created"
],
"properties": {
"file_name": {
"description": "The file name of the repository, as reported by the
client that uploaded it\n\nThis is intended for debugging. The file name
may not match any particular pattern, and even if it does, it may not be
accurate since it's just what the client reported.",
"type": "string"
},
"hash": {
"description": "The hash of the repository",
"type": "string",
"format": "hex string (32 bytes)"
},
"system_version": {
"description": "The system version for this repository\n\nThe
system version is a top-level version number applied to all the software
in the repository.",
"type": "string",
"pattern":
"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*
[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*
))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$"
},
"time_created": {
"description": "Time the repository was uploaded",
"type": "string",
"format": "date-time"
}
}
}Fields§
§file_name: StringThe file name of the repository, as reported by the client that uploaded it
This is intended for debugging. The file name may not match any particular pattern, and even if it does, it may not be accurate since it’s just what the client reported.
hash: StringThe hash of the repository
system_version: TufRepoSystemVersionThe system version for this repository
The system version is a top-level version number applied to all the software in the repository.
time_created: DateTime<Utc>Time the repository was uploaded
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TufRepo
impl<'de> Deserialize<'de> for TufRepo
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
Source§impl JsonSchema for TufRepo
impl JsonSchema for TufRepo
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
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 is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for TufRepo
impl RefUnwindSafe for TufRepo
impl Send for TufRepo
impl Sync for TufRepo
impl Unpin for TufRepo
impl UnwindSafe for TufRepo
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