mirror of
https://github.com/trussed-dev/trussed-staging.git
synced 2026-06-20 04:16:23 -07:00
Add client trait for FsInfo syscall
This commit is contained in:
@@ -6,7 +6,11 @@
|
||||
#![deny(unsafe_code)]
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
use trussed::{serde_extensions::Extension, types::Location, Error};
|
||||
use trussed::{
|
||||
serde_extensions::{Extension, ExtensionClient, ExtensionResult},
|
||||
types::Location,
|
||||
Error,
|
||||
};
|
||||
|
||||
pub struct FsInfoExtension;
|
||||
|
||||
@@ -74,3 +78,11 @@ impl Extension for FsInfoExtension {
|
||||
type Request = FsInfoExtensionRequest;
|
||||
type Reply = FsInfoExtensionReply;
|
||||
}
|
||||
|
||||
pub type FsInfoResult<'a, R, C> = ExtensionResult<'a, FsInfoExtension, R, C>;
|
||||
|
||||
pub trait FsInfoClient: ExtensionClient<FsInfoExtension> {
|
||||
fn fs_info(&mut self, location: Location) -> FsInfoResult<'_, FsInfoReply, Self> {
|
||||
self.extension(FsInfoRequest { location })
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user