Struct d4_framefile::Directory
source · [−]pub struct Directory<T>(_);Implementations
sourceimpl<T> Directory<T>
impl<T> Directory<T>
pub const INIT_BLOCK_SIZE: usize
sourcepub fn entry_kind(&self, name: &str) -> Option<EntryKind>
pub fn entry_kind(&self, name: &str) -> Option<EntryKind>
Get the type of the child object
sourceimpl<T: Read + Write + Seek> Directory<T>
impl<T: Read + Write + Seek> Directory<T>
pub fn make_root(back: T) -> Result<Directory<T>>
pub fn open_root_for_update(back: T, offset: u64) -> Result<Directory<T>>
pub fn flush(&mut self) -> Result<()>
pub fn create_blob(&mut self, name: &str, size: usize) -> Result<Blob<T>>
pub fn open_or_create_directory(&mut self, name: &str) -> Result<Directory<T>> where
T: Send + 'static,
pub fn create_directory(&mut self, name: &str) -> Result<Directory<T>> where
T: Send + 'static,
pub fn create_stream(
&mut self,
name: &str,
frame_size: usize
) -> Result<Stream<T>>
pub fn open_directory_for_update(&self, name: &str) -> Result<Directory<T>>
sourceimpl<T: Read + Seek> Directory<T>
impl<T: Read + Seek> Directory<T>
sourcepub fn open_root(back: T, offset: u64) -> Result<Directory<T>>
pub fn open_root(back: T, offset: u64) -> Result<Directory<T>>
Open an root directory from a seek-able backend stream and an absolute offset
pub fn open_blob(&self, name: &str) -> Result<Blob<T>>
pub fn open_stream_by_offset(
&self,
offset: u64,
frame_size: usize
) -> Result<Stream<T>>
pub fn open_stream(&self, name: &str) -> Result<Stream<T>>
pub fn open_directory(&self, name: &str) -> Result<Directory<T>>
pub fn open<P: AsRef<Path>>(&self, path: P) -> Result<OpenResult<T>>
pub fn recurse<Handle: FnMut(&Path, EntryKind) -> bool>(&self, handle: Handle)
pub fn find_first_object(&self, name: &str) -> Option<PathBuf>
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for Directory<T>
impl<T> Send for Directory<T> where
T: Send,
impl<T> Sync for Directory<T> where
T: Send,
impl<T> Unpin for Directory<T>
impl<T> UnwindSafe for Directory<T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more