pub struct KObjectStore {
pub root: Arc<SimpleDirectory>,
/* private fields */
}Expand description
Owner of all the KObjects in sysfs.
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>Root of the sysfs hierarchy.
Implementations§
Source§impl KObjectStore
impl KObjectStore
pub fn init(&self, kernel: &Kernel)
Sourcepub fn platform_bus(&self) -> Bus
pub fn platform_bus(&self) -> Bus
Device bus used for platform devices (/sys/bus/platform).
Sourcepub fn virtual_device(&self) -> Device
pub fn virtual_device(&self) -> Device
Root device used for virtual devices (/sys/devices/virtual).
Sourcepub fn platform_device(&self) -> Device
pub fn platform_device(&self) -> Device
Root device used for platform devices (/sys/devices/platform).
Sourcepub fn system_device(&self) -> Device
pub fn system_device(&self) -> Device
Root device used for system devices (/sys/devices/system).
Subsystems such as cpu place their root device beneath this device.
Sourcepub fn soc_device(&self) -> Device
pub fn soc_device(&self) -> Device
Bus device used for SoC peripheral devices (/sys/devices/platform/soc).
Sourcepub fn block_class(&self) -> Class
pub fn block_class(&self) -> Class
Device class used for block devices.
Sourcepub fn thermal_class(&self) -> Class
pub fn thermal_class(&self) -> Class
Device class used for thermal devices.
Sourcepub fn graphics_class(&self) -> Class
pub fn graphics_class(&self) -> Class
Device class used for graphics devices.
Sourcepub fn input_class(&self) -> Class
pub fn input_class(&self) -> Class
Device class used for input devices.
Sourcepub fn misc_class(&self) -> Class
pub fn misc_class(&self) -> Class
Device class used for misc devices.
Sourcepub fn dma_heap_class(&self) -> Class
pub fn dma_heap_class(&self) -> Class
Device class used for dma_heap devices.
Sourcepub fn starnix_class(&self) -> Class
pub fn starnix_class(&self) -> Class
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) -> Class
pub fn get_or_create_class(&self, name: &FsStr) -> Class
Get a class by name.
If the class does not exist, this function will create it.
pub fn class_with_dir( &self, name: &FsStr, build_directory: impl FnOnce(&SimpleDirectoryMutator), ) -> Class
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for KObjectStore
impl !RefUnwindSafe for KObjectStore
impl !UnwindSafe for KObjectStore
impl Send for KObjectStore
impl Sync for KObjectStore
impl Unpin for KObjectStore
impl UnsafeUnpin 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<F, N> FidlIntoNative<Box<N>> for Fwhere
F: FidlIntoNative<N>,
impl<F, N> FidlIntoNative<Box<N>> for Fwhere
F: FidlIntoNative<N>,
fn fidl_into_native(self) -> Box<N>
§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