pub trait FileEnumeratorExt: IsA<FileEnumerator> + 'static {
// Provided methods
fn close_async<P: FnOnce(Result<(), Error>) + 'static>(
&self,
io_priority: Priority,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
) { ... }
fn close_future(
&self,
io_priority: Priority,
) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>> { ... }
fn child(&self, info: &FileInfo) -> File { ... }
fn container(&self) -> File { ... }
fn has_pending(&self) -> bool { ... }
fn is_closed(&self) -> bool { ... }
fn next_file(
&self,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<Option<FileInfo>, Error> { ... }
fn next_files_async<P: FnOnce(Result<Vec<FileInfo>, Error>) + 'static>(
&self,
num_files: i32,
io_priority: Priority,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
) { ... }
fn next_files_future(
&self,
num_files: i32,
io_priority: Priority,
) -> Pin<Box_<dyn Future<Output = Result<Vec<FileInfo>, Error>> + 'static>> { ... }
fn set_pending(&self, pending: bool) { ... }
}Expand description
Provided Methods§
Sourcefn close_async<P: FnOnce(Result<(), Error>) + 'static>(
&self,
io_priority: Priority,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
)
fn close_async<P: FnOnce(Result<(), Error>) + 'static>( &self, io_priority: Priority, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )
Asynchronously closes the file enumerator.
If @cancellable is not None, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation
was cancelled, the error IOErrorEnum::Cancelled will be returned in
g_file_enumerator_close_finish().
§io_priority
the I/O priority of the request
§cancellable
optional #GCancellable object, None to ignore.
§callback
a #GAsyncReadyCallback to call when the request is satisfied
fn close_future( &self, io_priority: Priority, ) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>>
Sourcefn has_pending(&self) -> bool
fn has_pending(&self) -> bool
Sourcefn next_file(
&self,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<Option<FileInfo>, Error>
fn next_file( &self, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<Option<FileInfo>, Error>
Returns information for the next file in the enumerated object. Will block until the information is available. The #GFileInfo returned from this function will contain attributes that match the attribute string that was passed when the #GFileEnumerator was created.
See the documentation of #GFileEnumerator for information about the order of returned files.
On error, returns None and sets @error to the error. If the
enumerator is at the end, None will be returned and @error will
be unset.
§cancellable
optional #GCancellable object, None to ignore.
§Returns
A #GFileInfo or None on error
or end of enumerator. Free the returned object with
g_object_unref() when no longer needed.
Sourcefn next_files_async<P: FnOnce(Result<Vec<FileInfo>, Error>) + 'static>(
&self,
num_files: i32,
io_priority: Priority,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
)
fn next_files_async<P: FnOnce(Result<Vec<FileInfo>, Error>) + 'static>( &self, num_files: i32, io_priority: Priority, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )
message); ]|
During an async request no other sync and async calls are allowed, and will
result in IOErrorEnum::Pending errors.
Any outstanding I/O request with higher priority (lower numerical value) will
be executed before an outstanding request with lower priority. Default
priority is G_PRIORITY_DEFAULT.
§num_files
the number of file info objects to request
§io_priority
the I/O priority of the request
§cancellable
optional #GCancellable object, None to ignore.
§callback
a #GAsyncReadyCallback to call when the request is satisfied
fn next_files_future( &self, num_files: i32, io_priority: Priority, ) -> Pin<Box_<dyn Future<Output = Result<Vec<FileInfo>, Error>> + 'static>>
Sourcefn set_pending(&self, pending: bool)
fn set_pending(&self, pending: bool)
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".