pub unsafe trait HasGroup<Data> {
// Required methods
unsafe fn group(this: *const Self) -> *const config_group;
unsafe fn container_of(group: *const config_group) -> *const Self;
}
Expand description
Trait that allows offset calculations for structs that embed a
bindings::config_group
.
Users of the configfs API should not need to implement this trait.
§Safety
- Implementers of this trait must embed a
bindings::config_group
. - Methods must be implemented according to method documentation.
Required Methods§
sourceunsafe fn group(this: *const Self) -> *const config_group
unsafe fn group(this: *const Self) -> *const config_group
sourceunsafe fn container_of(group: *const config_group) -> *const Self
unsafe fn container_of(group: *const config_group) -> *const Self
Object Safety§
This trait is not object safe.