[][src]Struct hdf5::File

#[repr(transparent)]pub struct File(_);

HDF5 file object.

Implementations

impl File[src]

pub fn open<P: AsRef<Path>>(filename: P) -> Result<Self>[src]

Opens a file as read-only, file must exist.

pub fn open_rw<P: AsRef<Path>>(filename: P) -> Result<Self>[src]

Opens a file as read/write, file must exist.

pub fn create<P: AsRef<Path>>(filename: P) -> Result<Self>[src]

Creates a file, truncates if exists.

pub fn create_excl<P: AsRef<Path>>(filename: P) -> Result<Self>[src]

Creates a file, fails if exists.

pub fn append<P: AsRef<Path>>(filename: P) -> Result<Self>[src]

Opens a file as read/write if exists, creates otherwise.

pub fn open_as<P: AsRef<Path>>(filename: P, mode: OpenMode) -> Result<Self>[src]

Opens a file in a given mode.

pub fn with_options() -> FileBuilder[src]

Opens a file with custom file-access and file-creation options.

pub fn size(&self) -> u64[src]

Returns the file size in bytes (or 0 if the file handle is invalid).

pub fn free_space(&self) -> u64[src]

Returns the free space in the file in bytes (or 0 if the file handle is invalid).

pub fn is_read_only(&self) -> bool[src]

Returns true if the file was opened in a read-only mode.

pub fn userblock(&self) -> u64[src]

Returns the userblock size in bytes (or 0 if the file handle is invalid).

pub fn flush(&self) -> Result<()>[src]

Flushes the file to the storage medium.

pub fn close(self)[src]

Closes the file and invalidates all open handles for contained objects.

pub fn access_plist(&self) -> Result<FileAccess>[src]

Returns a copy of the file access property list.

pub fn fapl(&self) -> Result<FileAccess>[src]

A short alias for access_plist().

pub fn create_plist(&self) -> Result<FileCreate>[src]

Returns a copy of the file creation property list.

pub fn fcpl(&self) -> Result<FileCreate>[src]

A short alias for create_plist().

Methods from Deref<Target = Group>

pub fn len(&self) -> u64[src]

Returns the number of objects in the container (or 0 if the container is invalid).

pub fn is_empty(&self) -> bool[src]

Returns true if the container has no linked objects (or if the container is invalid).

pub fn create_group(&self, name: &str) -> Result<Self>[src]

Create a new group in a file or group.

pub fn group(&self, name: &str) -> Result<Self>[src]

Opens an existing group in a file or group.

Creates a soft link. Note: src and dst are relative to the current object.

Creates a hard link. Note: src and dst are relative to the current object.

Relinks an object. Note: name and path are relative to the current object.

Removes a link to an object from this file or group.

Check if a link with a given name exists in this file or group.

pub fn new_dataset<T: H5Type>(&self) -> DatasetBuilder<T>[src]

Instantiates a new dataset builder.

pub fn dataset(&self, name: &str) -> Result<Dataset>[src]

Opens an existing dataset in the file or group.

pub fn member_names(&self) -> Result<Vec<String>>[src]

Returns names of all the members in the group, non-recursively.

Methods from Deref<Target = Location>

pub fn name(&self) -> String[src]

Returns the name of the object within the file, or empty string if the object doesn't have a name (e.g., an anonymous dataset).

pub fn filename(&self) -> String[src]

Returns the name of the file containing the named object (or the file itself).

pub fn file(&self) -> Result<File>[src]

Returns a handle to the file containing the named object (or the file itself).

pub fn comment(&self) -> Option<String>[src]

Returns the commment attached to the named object, if any.

pub fn set_comment(&self, comment: &str) -> Result<()>[src]

Set or the commment attached to the named object.

pub fn clear_comment(&self) -> Result<()>[src]

Clear the commment attached to the named object.

Methods from Deref<Target = Object>

pub fn id(&self) -> hid_t[src]

pub fn refcount(&self) -> u32[src]

Returns reference count if the handle is valid and 0 otherwise.

pub fn is_valid(&self) -> bool[src]

Returns true if the object has a valid unlocked identifier (false for pre-defined locked identifiers like property list classes).

pub fn id_type(&self) -> H5I_type_t[src]

Returns type of the object.

Trait Implementations

impl Clone for File[src]

impl Debug for File[src]

impl Deref for File[src]

type Target = Group

The resulting type after dereferencing.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.