pub struct SBFile {
    pub raw: SBFileRef,
}
Expand description

Represents a file.

Fields

raw: SBFileRef

The underlying raw SBFileRef.

Implementations

Create an SBFile from a libc::FILE.

Safety

The file pointer must be valid.

Create an SBFile from a file descriptor.

Check whether or not this is a valid SBFile value.

Read data from the file.

If successful, the result will contain the number of bytes read.

Write data to the file.

If successful, the result will contain the number of bytes written.

Flush the file.

Close the file.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.