[−][src]Struct stdweb::web::FileReader
The FileReader object lets web applications asynchronously read the contents of files (or raw data buffers) stored on the user's computer, using File or Blob objects to specify the file or data to read.
Methods
impl FileReader
[src]
pub fn new() -> FileReader
[src]
Returns a newly constructed FileReader
.
pub fn read_as_text<T: IBlob>(&self, blob: &T) -> Result<(), TODO>
[src]
Starts reading the contents of the specified blob. Once finished
the result
attribute will contain the contents of the file as a text string.
pub fn read_as_array_buffer<T: IBlob>(&self, blob: &T) -> Result<(), TODO>
[src]
Starts reading the contents of the specified blob. Once finished
the result
attribute will contain the contents of the file as an TypedArray.
pub fn abort(&self)
[src]
Aborts the read operation. Upon return, the ready_state
will be Done
.
pub fn ready_state(&self) -> FileReaderReadyState
[src]
Returns the current state of the reader.
pub fn result(&self) -> Option<FileReaderResult>
[src]
The file's contents. This method will only return a value after the read operation is complete, and the format of the data depends on which of the methods was used to initiate the read operation.
Trait Implementations
impl JsSerialize for FileReader
[src]
impl TryFrom<EventTarget> for FileReader
[src]
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(value: EventTarget) -> Result<Self, Self::Error>
[src]
impl TryFrom<FileReader> for Reference
[src]
type Error = Void
The type returned in the event of a conversion error.
fn try_from(value: FileReader) -> Result<Self, Self::Error>
[src]
impl TryFrom<Reference> for FileReader
[src]
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(reference: Reference) -> Result<Self, Self::Error>
[src]
impl<'_r> TryFrom<&'_r Reference> for FileReader
[src]
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(reference: &Reference) -> Result<Self, Self::Error>
[src]
impl TryFrom<Value> for FileReader
[src]
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(value: Value) -> Result<Self, Self::Error>
[src]
impl<'_r> TryFrom<&'_r Value> for FileReader
[src]
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(value: &Value) -> Result<Self, Self::Error>
[src]
impl InstanceOf for FileReader
[src]
fn instance_of(reference: &Reference) -> bool
[src]
impl ReferenceType for FileReader
[src]
unsafe fn from_reference_unchecked(reference: Reference) -> Self
[src]
impl IEventTarget for FileReader
[src]
fn add_event_listener<T, F>(&self, listener: F) -> EventListenerHandle where
T: ConcreteEvent,
F: FnMut(T) + 'static,
[src]
T: ConcreteEvent,
F: FnMut(T) + 'static,
Adds given event handler to the list of event listeners for the specified EventTarget
on which it's called. Read more
fn dispatch_event<T: IEvent>(&self, event: &T) -> Result<bool, TODO>
[src]
Dispatches an Event
at this EventTarget
, invoking the affected event listeners in the appropriate order. Read more
impl PartialEq<FileReader> for FileReader
[src]
fn eq(&self, other: &FileReader) -> bool
[src]
fn ne(&self, other: &FileReader) -> bool
[src]
impl AsRef<Reference> for FileReader
[src]
impl Clone for FileReader
[src]
fn clone(&self) -> FileReader
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl From<FileReader> for EventTarget
[src]
fn from(value: FileReader) -> Self
[src]
impl From<FileReader> for Reference
[src]
fn from(value: FileReader) -> Self
[src]
impl Eq for FileReader
[src]
impl Debug for FileReader
[src]
Auto Trait Implementations
impl Send for FileReader
impl Sync for FileReader
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,