[−][src]Struct splitfile::SplitFile
A reference to an open set of volumes on the filesystem.
An instance of SplitFile can be read and/or written in the same way as a
single file is via fs::File, but with data allocated
across volumes.
Second and subsequent volumes written use the path and filename of the first volume, and append the extension ".n", where n is the index of each respective volume.
SplitFile implements Read, Write and Seek traits.
Methods
impl SplitFile[src]
pub fn open<P: AsRef<Path>>(path: P, volsize: u64) -> Result<SplitFile>[src]
Attempts to open a file in read-only mode.
See the OpenOptions::open method for more details.
pub fn create<P: AsRef<Path>>(path: P, volsize: u64) -> Result<SplitFile>[src]
Opens a file in write-only mode.
This function will create a file if it does not exist, and will truncate it if it does.
Trait Implementations
impl Debug for SplitFile[src]
impl Read for SplitFile[src]
fn read(&mut self, buf: &mut [u8]) -> Result<usize>[src]
fn read_vectored(&mut self, bufs: &mut [IoSliceMut]) -> Result<usize, Error>1.36.0[src]
unsafe fn initializer(&self) -> Initializer[src]
fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize, Error>1.0.0[src]
fn read_to_string(&mut self, buf: &mut String) -> Result<usize, Error>1.0.0[src]
fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>1.6.0[src]
fn by_ref(&mut self) -> &mut Self1.0.0[src]
fn bytes(self) -> Bytes<Self>1.0.0[src]
fn chain<R>(self, next: R) -> Chain<Self, R> where
R: Read, 1.0.0[src]
R: Read,
fn take(self, limit: u64) -> Take<Self>1.0.0[src]
impl Seek for SplitFile[src]
fn seek(&mut self, pos: SeekFrom) -> Result<u64>[src]
fn stream_len(&mut self) -> Result<u64, Error>[src]
fn stream_position(&mut self) -> Result<u64, Error>[src]
impl Write for SplitFile[src]
fn write(&mut self, buf: &[u8]) -> Result<usize>[src]
fn flush(&mut self) -> Result<()>[src]
fn write_vectored(&mut self, bufs: &[IoSlice]) -> Result<usize, Error>1.36.0[src]
fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>1.0.0[src]
fn write_all_vectored(&mut self, bufs: &mut [IoSlice]) -> Result<(), Error>[src]
fn write_fmt(&mut self, fmt: Arguments) -> Result<(), Error>1.0.0[src]
fn by_ref(&mut self) -> &mut Self1.0.0[src]
Auto Trait Implementations
impl RefUnwindSafe for SplitFile
impl Send for SplitFile
impl Sync for SplitFile
impl Unpin for SplitFile
impl UnwindSafe for SplitFile
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,