Trait gloo_file::BlobContents
source · [−]pub trait BlobContents: Sealed {
unsafe fn into_jsvalue(self) -> JsValue;
}Expand description
This trait is used to overload the Blob::new_with_options function, allowing a variety of
types to be used to create a Blob. Ignore this, and use &[u8], &str, etc to create a Blob.
The trait is sealed: it can only be implemented by types in this
crate, as this crate relies on invariants regarding the JsValue returned from into_jsvalue.
Required Methods
unsafe fn into_jsvalue(self) -> JsValue
unsafe fn into_jsvalue(self) -> JsValue
Safety
For &[u8] and &str, the returned Uint8Array must be modified,
and must not be kept past the lifetime of the original slice.