Trait kernel::file_operations::FileOpener[][src]

pub trait FileOpener<T: ?Sized>: FileOperations {
    fn open(context: &T) -> Result<Self::Wrapper>;
}
Expand description

Trait for implementers of kernel files.

In addition to the methods in FileOperations, implementers must also provide FileOpener::open with a customised argument. This allows a single implementation of FileOperations to be used for different types of registrations, for example, miscdev and chrdev.

Required methods

Creates a new instance of this file.

Corresponds to the open function pointer in struct file_operations.

Implementors