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>
Auto Trait Implementations§
impl<'bytes> Freeze for File<'bytes>
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