pub struct KObjectStore {
pub root: Arc<SimpleDirectory>,
/* private fields */
}Expand description
The owner of all the KObjects in sysfs.
This structure holds strong references to the KObjects that are visible in sysfs. These objects are organized into hierarchies that make it easier to implement sysfs.
Fields§
§root: Arc<SimpleDirectory>The root of the sysfs hierarchy.
Implementations§
Source§impl KObjectStore
impl KObjectStore
pub fn init<L>(&self, locked: &mut Locked<L>, kernel: &Kernel)where
L: LockEqualOrBefore<FileOpsCore>,
Sourcepub fn virtual_bus(&self) -> Bus
pub fn virtual_bus(&self) -> Bus
The virtual bus kobject where all virtual and pseudo devices are stored.
Sourcepub fn virtual_block_class(&self) -> Class
pub fn virtual_block_class(&self) -> Class
The device class used for virtual block devices.
Sourcepub fn virtual_thermal_class(&self) -> Class
pub fn virtual_thermal_class(&self) -> Class
The device class used for virtual thermal devices.
Sourcepub fn graphics_class(&self) -> Class
pub fn graphics_class(&self) -> Class
The device class used for virtual graphics devices.
Sourcepub fn input_class(&self) -> Class
pub fn input_class(&self) -> Class
The device class used for virtual input devices.
Sourcepub fn misc_class(&self) -> Class
pub fn misc_class(&self) -> Class
The device class used for virtual misc devices.
Sourcepub fn dma_heap_class(&self) -> Class
pub fn dma_heap_class(&self) -> Class
The device class used for virtual dma_heap devices.
Sourcepub fn starnix_class(&self) -> Class
pub fn starnix_class(&self) -> Class
An incorrect device class.
This class exposes the name “starnix” to userspace, which is incorrect. Instead, devices should use a class that represents their usage rather than their implementation.
This class exists because a number of devices incorrectly use this class. We should fix those devices to report their proper class.
Sourcepub fn get_or_create_bus(&self, name: &FsStr) -> Bus
pub fn get_or_create_bus(&self, name: &FsStr) -> Bus
Get a bus by name.
If the bus does not exist, this function will create it.
Sourcepub fn get_or_create_class(&self, name: &FsStr, bus: Bus) -> Class
pub fn get_or_create_class(&self, name: &FsStr, bus: Bus) -> Class
Get a class by name.
If the bus does not exist, this function will create it.
pub fn class_with_dir( &self, name: &FsStr, bus: Bus, build_collection: impl FnOnce(&SimpleDirectoryMutator), ) -> Class
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for KObjectStore
impl !RefUnwindSafe for KObjectStore
impl Send for KObjectStore
impl Sync for KObjectStore
impl Unpin for KObjectStore
impl !UnwindSafe for KObjectStore
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
T to [Self]Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more