Struct kernel::chrdev::Registration[][src]

pub struct Registration<const N: usize> { /* fields omitted */ }
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::KernelModule 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

The type of argument this adapter extracts.

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

Performs the conversion.

Performs the conversion.

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.