pub struct AssetUploads(pub BTreeMap<AssetName, AssetUpload>);Expand description
The value of MetadataKey::ASSETS_KEY on a destination record: what its hosted source
uploaded, by asset name.
Written by the hosted plugin in the same write that lands the record, and read back by the next copy onto it: an asset whose SHA-256 equals the one recorded here reuses the recorded URL and is not uploaded again.
Tuple Fields§
§0: BTreeMap<AssetName, AssetUpload>Implementations§
Source§impl AssetUploads
impl AssetUploads
Sourcepub fn read(metadata: &BTreeMap<String, Value>) -> Result<Option<Self>, String>
pub fn read(metadata: &BTreeMap<String, Value>) -> Result<Option<Self>, String>
What metadata records under MetadataKey::ASSETS_KEY, or None when it records
nothing there.
§Errors
A message naming the key when what it holds is not this shape.
Sourcepub fn to_value(&self) -> Value
pub fn to_value(&self) -> Value
The value this record is written under MetadataKey::ASSETS_KEY as.
Trait Implementations§
Source§impl Clone for AssetUploads
impl Clone for AssetUploads
Source§impl Debug for AssetUploads
impl Debug for AssetUploads
Source§impl Default for AssetUploads
impl Default for AssetUploads
Source§impl<'de> Deserialize<'de> for AssetUploads
impl<'de> Deserialize<'de> for AssetUploads
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 AssetUploads
Source§impl JsonSchema for AssetUploads
impl JsonSchema for AssetUploads
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 PartialEq for AssetUploads
impl PartialEq for AssetUploads
Source§impl Serialize for AssetUploads
impl Serialize for AssetUploads
impl StructuralPartialEq for AssetUploads
Auto Trait Implementations§
impl Freeze for AssetUploads
impl RefUnwindSafe for AssetUploads
impl Send for AssetUploads
impl Sync for AssetUploads
impl Unpin for AssetUploads
impl UnsafeUnpin for AssetUploads
impl UnwindSafe for AssetUploads
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