pub struct File<'bytes> {
pub header: Header,
/* private fields */
}
Expand description
Represents a file within the FO4 virtual filesystem.
Fields§
§header: Header
Implementations§
source§impl<'bytes> File<'bytes>
impl<'bytes> File<'bytes>
pub fn as_mut_ptr(&mut self) -> *mut Chunk<'bytes>
pub fn as_mut_slice(&mut self) -> &mut [Chunk<'bytes>]
pub fn as_ptr(&self) -> *const Chunk<'bytes>
pub fn as_slice(&self) -> &[Chunk<'bytes>]
pub fn clear(&mut self)
sourcepub fn drain<R>(&mut self, range: R) -> impl Iterator<Item = Chunk<'bytes>> + '_where
R: RangeBounds<usize>,
pub fn drain<R>(&mut self, range: R) -> impl Iterator<Item = Chunk<'bytes>> + '_where
R: RangeBounds<usize>,
§Panics
Panics if start_bound
exceeds end_bound
, or if end_bound
exceeds len
.
pub fn is_empty(&self) -> bool
pub fn is_full(&self) -> bool
pub fn iter(&self) -> impl Iterator<Item = &Chunk<'bytes>>
pub fn iter_mut(&mut self) -> impl Iterator<Item = &mut Chunk<'bytes>>
pub fn len(&self) -> usize
pub fn new() -> Self
pub fn pop(&mut self) -> Option<Chunk<'bytes>>
pub fn remaining_capacity(&self) -> usize
pub fn retain_mut<F>(&mut self, f: F)
sourcepub fn swap_remove(&mut self, index: usize) -> Chunk<'bytes>
pub fn swap_remove(&mut self, index: usize) -> Chunk<'bytes>
pub fn truncate(&mut self, len: usize)
sourcepub fn try_insert(
&mut self,
index: usize,
element: Chunk<'bytes>
) -> Result<(), CapacityError<'bytes>>
pub fn try_insert( &mut self, index: usize, element: Chunk<'bytes> ) -> Result<(), CapacityError<'bytes>>
pub fn try_push( &mut self, element: Chunk<'bytes> ) -> Result<(), CapacityError<'bytes>>
sourcepub fn try_swap_remove(&mut self, index: usize) -> Option<Chunk<'bytes>>
pub fn try_swap_remove(&mut self, index: usize) -> Option<Chunk<'bytes>>
pub fn write<Out>(&self, stream: &mut Out, options: &WriteOptions) -> Result<()>
Trait Implementations§
source§impl<'bytes> FromIterator<Chunk<'bytes>> for File<'bytes>
impl<'bytes> FromIterator<Chunk<'bytes>> for File<'bytes>
source§impl<'bytes, 'this> IntoIterator for &'this File<'bytes>
impl<'bytes, 'this> IntoIterator for &'this File<'bytes>
source§impl<'bytes, 'this> IntoIterator for &'this mut File<'bytes>
impl<'bytes, 'this> IntoIterator for &'this mut File<'bytes>
source§impl<'bytes> IntoIterator for File<'bytes>
impl<'bytes> IntoIterator for File<'bytes>
source§impl ReaderWithOptions<&File> for File<'static>
impl ReaderWithOptions<&File> for File<'static>
source§impl ReaderWithOptions<&Path> for File<'static>
impl ReaderWithOptions<&Path> for File<'static>
source§impl<'bytes> ReaderWithOptions<Borrowed<'bytes>> for File<'bytes>
impl<'bytes> ReaderWithOptions<Borrowed<'bytes>> for File<'bytes>
source§impl<'bytes> ReaderWithOptions<Copied<'bytes>> for File<'static>
impl<'bytes> ReaderWithOptions<Copied<'bytes>> for File<'static>
Auto Trait Implementations§
impl<'bytes> RefUnwindSafe for File<'bytes>
impl<'bytes> Send for File<'bytes>
impl<'bytes> Sync for File<'bytes>
impl<'bytes> Unpin for File<'bytes>
impl<'bytes> UnwindSafe for File<'bytes>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more