Struct same_file::Handle [] [src]

pub struct Handle(_);

A handle to a file that can be tested for equality with other handles.

If two files are the same, then any two handles of those files will compare equal. If two files are not the same, then any two handles of those files will compare not-equal.

A handle consumes an open file resource as long as it exists.

Note that it's possible for comparing two handles to produce a false positive on some platforms. Namely, two handles can compare equal even if the two handles don't point to the same file.

Methods

impl Handle
[src]

Construct a handle from a path.

Note that the underlying File is opened in read-only mode on all platforms.

Construct a handle from a file.

Construct a handle from stdin.

Construct a handle from stdout.

Construct a handle from stderr.

Return a reference to the underlying file.

Return a mutable reference to the underlying file.

Return the underlying device number of this handle.

Return the underlying inode number of this handle.

Trait Implementations

impl AsRawFd for Handle
[src]

Extracts the raw file descriptor. Read more

impl IntoRawFd for Handle
[src]

Consumes this object, returning the raw underlying file descriptor. Read more

impl Debug for Handle
[src]

Formats the value using the given formatter.

impl Eq for Handle
[src]

impl PartialEq for Handle
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.