File

Struct File 

Source
pub struct File { /* private fields */ }
Expand description

Opens a CBM file

§Warning

This is under constuction

Implementations§

Source§

impl File

Source

pub fn open( filename: &CStr, device: Device, logical_file_number: u8, ) -> Result<Self, FileError>

Attempts to open a file in read-only mode.

Trait Implementations§

Source§

impl Debug for File

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for File

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl PartialEq for File

Source§

fn eq(&self, other: &File) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Read for File

Source§

type ReadError = FileError

Value of this type is returned when read() fails. Read more
Source§

fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::ReadError>

Pull some bytes from this source into the specified buffer, returning how many bytes were read. Read more
Source§

fn read_exact( &mut self, buf: &mut [u8], ) -> Result<(), ReadExactError<Self::ReadError>>

Read the exact number of bytes required to fill buf. Read more
Source§

fn available_bytes(&self, _at_least: usize) -> bool

Hints whether there are at least at_least bytes available. Read more
Source§

fn chain<R>(self, other: R) -> Chain<Self, R>
where R: Read, Self: Sized,

Chains another reader after self. When self ends (returns Ok(0)), the other reader will provide bytes to read.
Source§

fn by_ref(&mut self) -> &mut Self
where Self: Sized,

Creates a “by reference” adaptor for this instance of Read. Read more
Source§

impl Eq for File

Source§

impl StructuralPartialEq for File

Auto Trait Implementations§

§

impl Freeze for File

§

impl RefUnwindSafe for File

§

impl Send for File

§

impl Sync for File

§

impl Unpin for File

§

impl UnwindSafe for File

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<R> ReadExt for R
where R: Read + ?Sized,

Source§

fn read_ext<'a, 'b>( &'a mut self, buf: &'b mut [u8], ) -> Result<ReadResult<'b>, <R as Read>::ReadError>

Reads from the reader and converts the result.
Source§

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

Source§

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>,

Source§

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.