pub trait SentryExchangeable {
// Required methods
fn to_kernel(&self) -> Result<Status, Status>;
fn from_kernel(&mut self) -> Result<Status, Status>;
}Expand description
Sentry exchangeable opaque trait, only defined for systypes defined types
This trait is declared in order to allow the attribute checking but is not exported as no upper layer type needs to implement it Trait of kernel-user exchangeable objects
This trait written in order to support the notion of “kernel-exchangeable” type. Any type that do support this trait can be delivered to (and/or received from) the kernel.
The effective implementation of this trait public functions are kept private, and can’t be implemented out of this very crate in order to ensure that only this crate’s declared types are exchangeable. To ensure such a restriction, this trait is hosted by the current, crate-private, module.
As a consequence, don’t try to implement that trait in any of the upper layers.
Required Methods§
Sourcefn to_kernel(&self) -> Result<Status, Status>
fn to_kernel(&self) -> Result<Status, Status>
Copy the current object to the kernel exchagne zone
Sourcefn from_kernel(&mut self) -> Result<Status, Status>
fn from_kernel(&mut self) -> Result<Status, Status>
set the current object using the data delivered by the kernel in the exchange zone
Implementations on Foreign Types§
Source§impl SentryExchangeable for &[u8]
impl SentryExchangeable for &[u8]
Source§impl SentryExchangeable for &mut [u8]
impl SentryExchangeable for &mut [u8]
Implementors§
impl SentryExchangeable for ShmInfo
SentryExchangeable trait implementation for ShmInfo. Shminfo is a typical structure which is returned by the kernel to the userspace in order to delivers various SHM-related information to a given task that is using the corresponding SHM.
In test mode only, this structure can be written back to the Exchange Area. In production mode, the application can’t write such a content to the exchange as the kernel as strictly no use of it.