[][src]Struct gloo_file::Blob

pub struct Blob { /* fields omitted */ }

A Blob.

Blobs can be created directly from &str, &[u8], and js_sys::ArrayBuffers using the Blob::new or Blob::new_with_options functions.

Methods

impl Blob[src]

pub fn new<T>(content: T) -> Blob where
    T: BlobContents
[src]

Create a new Blob from a &str, &[u8] or js_sys::ArrayBuffer.

pub fn new_with_options<T>(content: T, mime_type: Option<&str>) -> Blob where
    T: BlobContents
[src]

Like new, but allows specifying the MIME type (also known as content type or media type) of the Blob.

pub fn slice(&self, start: u64, end: u64) -> Self[src]

pub fn size(&self) -> u64[src]

The number of bytes in the Blob/File.

pub fn raw_mime_type(&self) -> String[src]

The raw MIME type (also known as content type or media type) of the File or Blob.

Trait Implementations

impl AsRef<Blob> for Blob[src]

impl AsRef<JsValue> for Blob[src]

impl Debug for Blob[src]

impl From<Blob> for Blob[src]

impl From<Blob> for Blob[src]

impl From<Blob> for JsValue[src]

impl From<File> for Blob[src]

impl From<File> for Blob[src]

Auto Trait Implementations

impl RefUnwindSafe for Blob

impl !Send for Blob

impl !Sync for Blob

impl Unpin for Blob

impl UnwindSafe for Blob

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.