Struct libuv::requests::fs::FsReq

source ·
pub struct FsReq { /* private fields */ }
Expand description

File system request type.

Implementations§

source§

impl FsReq

source

pub fn new<CB: Into<FsCB<'static>>>(cb: CB) -> Result<FsReq>

Create a new fs request

source

pub fn request_type(&self) -> FsType

Type of request that was made

source

pub fn loop(&self) -> Loop

The loop that ran this request

source

pub fn result(&self) -> Result<usize>

Returns the result from the request

source

pub fn system_error(&self) -> i32

Returns the platform specific error code - GetLastError() value on Windows and req.result() on other platforms.

source

pub fn stat(&self) -> Stat

Returns the file stats

source

pub fn dir(&self) -> Option<Dir>

If this request is from opendir() or readdir(), return the Dir struct

source

pub fn statfs(&self) -> Option<StatFs>

If this request is from fs_statfs(), return the StatFs struct

source

pub fn real_path(&self) -> Option<String>

If this request is from fs_readlink() or fs_realpath(), return the path

source

pub fn path(&self) -> String

Returns the path of this file

source

pub fn destroy(&mut self)

Free up memory associated with this request. If you are using one of the async fs_* functions, this will be called automatically after the callback runs.

Trait Implementations§

source§

impl Clone for FsReq

source§

fn clone(&self) -> FsReq

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl From<FsReq> for Req

source§

fn from(fs: FsReq) -> Req

Converts to this type from the input type.
source§

impl ReqTrait for FsReq

source§

fn cancel(&mut self) -> Result<()>

Cancel a pending request. Fails if the request is executing or has finished executing. Read more
source§

fn get_type(&self) -> ReqType

Returns the type of the request.
source§

impl ToReq for FsReq

source§

fn to_req(&self) -> Req

source§

impl Copy for FsReq

Auto Trait Implementations§

§

impl RefUnwindSafe for FsReq

§

impl !Send for FsReq

§

impl !Sync for FsReq

§

impl Unpin for FsReq

§

impl UnwindSafe for FsReq

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.