Skip to content

Commit

Permalink
Add utility traits to request and reply structures
Browse files Browse the repository at this point in the history
  • Loading branch information
sosthene-nitrokey committed Jul 25, 2024
1 parent 9819408 commit 170ab14
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions extensions/fs-info/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ use trussed::{

pub struct FsInfoExtension;

#[derive(Serialize, Deserialize)]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)]
pub enum FsInfoExtensionRequest {
FsInfo(FsInfoRequest),
}

#[derive(Serialize, Deserialize)]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)]
pub struct FsInfoRequest {
pub location: Location,
}
Expand All @@ -40,18 +40,18 @@ impl TryFrom<FsInfoExtensionRequest> for FsInfoRequest {
}
}

#[derive(Serialize, Deserialize)]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)]
pub enum FsInfoExtensionReply {
FsInfo(FsInfoReply),
}

#[derive(Serialize, Deserialize)]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)]
pub struct FsInfoReply {
pub block_info: Option<BlockInfo>,
pub available_space: usize,
}

#[derive(Serialize, Deserialize)]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)]
pub struct BlockInfo {
pub size: usize,
pub total: usize,
Expand Down

0 comments on commit 170ab14

Please sign in to comment.