[][src]Crate mio_gloo_file

Provides wrappers for working with Blobs and Files from JavaScript.

A File is just a Blob with some extra data: a name and a last modified time.

In the File API, Blobs are opaque objects that lazily fetch their contained data when asked. This allows a Blob to represent some resource that isn't completely available, for example a WebSocket message that is being received or a file that needs to be read from disk.

You can asynchronously access the contents of the Blob through callbacks, but that is rather inconvenient, so this crate provides some functions which return a Future instead.

Modules

callbacks

Structs

Blob

A Blob.

File

A File.

FileList

A list of files, for example from an <input type="file">.

Enums

FileReadError

Traits

BlobContents

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.