Trait io::KnownLength

source ·
pub trait KnownLength {
    // Required method
    fn len(&self) -> usize;
}
Expand description

A trait that represents an I/O stream that has a known length, e.g., a disk drive.

This trait exists to enable seeking to an offset from the end of the stream.

Required Methods§

source

fn len(&self) -> usize

Returns the length (size in bytes) of this I/O stream or device.

Implementations on Foreign Types§

source§

impl<KL> KnownLength for &KLwhere KL: KnownLength + ?Sized,

source§

fn len(&self) -> usize

source§

impl<KL> KnownLength for Box<KL>where KL: KnownLength + ?Sized,

source§

fn len(&self) -> usize

source§

impl<KL> KnownLength for &mut KLwhere KL: KnownLength + ?Sized,

source§

fn len(&self) -> usize

Implementors§

source§

impl<'io, IO, L, B> KnownLength for LockableIo<'io, IO, L, B>where IO: KnownLength + 'io + ?Sized, L: for<'a> Lockable<'a, IO> + ?Sized, B: Borrow<L>,

source§

impl<IO> KnownLength for Reader<IO>where IO: KnownLength,

source§

impl<IO> KnownLength for ReaderWriter<IO>where IO: KnownLength,

source§

impl<IO> KnownLength for Writer<IO>where IO: KnownLength,

source§

impl<R> KnownLength for ByteReaderWrapper<R>where R: KnownLength + BlockReader,

source§

impl<RW> KnownLength for ByteReaderWriterWrapper<RW>where RW: KnownLength + BlockReader + BlockWriter,

source§

impl<RW> KnownLength for ByteWriterWrapper<RW>where RW: KnownLength + BlockReader + BlockWriter,