pub struct Registration<const N: usize> { /* private fields */ }
Expand description

Character device registration.

May contain up to a fixed number (N) of devices. Must be pinned.

Implementations

Creates a Registration object for a character device.

This does not register the device: see Self::register().

This associated function is intended to be used when you need to avoid a memory allocation, e.g. when the Registration is a member of a bigger structure inside your crate::Module instance. If you are going to pin the registration right away, call Self::new_pinned() instead.

Creates a pinned Registration object for a character device.

This does not register the device: see Self::register().

Registers a character device.

You may call this once per device type, up to N times.

Trait Implementations

Executes the destructor for this type. Read more
Converts untyped data stored in [struct inode] and [struct file] (when [struct file_operations::open] is called) into the given type. For example, for miscdev devices, a pointer to the registered [struct miscdev] is stored in [struct file::private_data]. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
This documentation is an old archive. Please see https://rust.docs.kernel.org instead.