pub struct SupplementalAssetsBuilder { /* private fields */ }Expand description
Builder for an owned deterministic supplemental-asset mapping.
Implementations§
Source§impl SupplementalAssetsBuilder
impl SupplementalAssetsBuilder
Sourcepub fn asset(
self,
file_id: impl Into<String>,
bytes: impl Into<Vec<u8>>,
) -> Self
pub fn asset( self, file_id: impl Into<String>, bytes: impl Into<Vec<u8>>, ) -> Self
Adds owned bytes without an advisory media type.
Sourcepub fn asset_with_media_type(
self,
file_id: impl Into<String>,
bytes: impl Into<Vec<u8>>,
media_type: impl Into<String>,
) -> Self
pub fn asset_with_media_type( self, file_id: impl Into<String>, bytes: impl Into<Vec<u8>>, media_type: impl Into<String>, ) -> Self
Adds owned bytes with an advisory media type.
Sourcepub fn build(self) -> Result<SupplementalAssets, RequestError>
pub fn build(self) -> Result<SupplementalAssets, RequestError>
Validates and constructs the deterministic asset mapping.
§Errors
Returns a RequestError naming the first offending asset when a
scene file ID is empty (request.empty-asset-id) or added more than
once (request.duplicate-asset-id), or when an advisory media type is
malformed (request.invalid-asset-media-type).
Trait Implementations§
Source§impl Clone for SupplementalAssetsBuilder
impl Clone for SupplementalAssetsBuilder
Source§impl Debug for SupplementalAssetsBuilder
impl Debug for SupplementalAssetsBuilder
Auto Trait Implementations§
impl Freeze for SupplementalAssetsBuilder
impl RefUnwindSafe for SupplementalAssetsBuilder
impl Send for SupplementalAssetsBuilder
impl Sync for SupplementalAssetsBuilder
impl Unpin for SupplementalAssetsBuilder
impl UnsafeUnpin for SupplementalAssetsBuilder
impl UnwindSafe for SupplementalAssetsBuilder
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.Source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.