pub trait BlobContents: Sealed {
// Required method
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§
Sourceunsafe 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.