diff options
| author | Alejandro Soto <alejandro@34project.org> | 2021-12-28 21:59:56 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2021-12-28 21:59:56 -0600 |
| commit | e78c003bc555a5cb9396c5d65d3a9831507813de (patch) | |
| tree | 12be9957fbfe6a300b3d60e066e76cde81df65d4 /src | |
| parent | 5308f999f95343d3d232e6e9258ea607f0a05dad (diff) | |
Expose Operation<'o> in the public API
Diffstat (limited to 'src')
| -rw-r--r-- | src/fuse/mod.rs | 10 | ||||
| -rw-r--r-- | src/fuse/ops.rs | 3 |
2 files changed, 7 insertions, 6 deletions
diff --git a/src/fuse/mod.rs b/src/fuse/mod.rs index a4c9f06..5893d79 100644 --- a/src/fuse/mod.rs +++ b/src/fuse/mod.rs @@ -12,13 +12,13 @@ pub mod mount; pub mod session; mod private_trait { - pub trait Operation<'o> { - type RequestBody: crate::proto::Structured<'o>; - type ReplyTail; - } + pub trait Sealed {} } -use private_trait::Operation; +pub trait Operation<'o>: private_trait::Sealed { + type RequestBody: crate::proto::Structured<'o>; + type ReplyTail; +} pub type Op<'o, O = ops::Any> = (Request<'o, O>, Reply<'o, O>); diff --git a/src/fuse/ops.rs b/src/fuse/ops.rs index 4727d10..f715e12 100644 --- a/src/fuse/ops.rs +++ b/src/fuse/ops.rs @@ -18,8 +18,9 @@ use super::{ macro_rules! op { { $name:ident $operation:tt } => { - pub struct $name(()); + pub struct $name(std::convert::Infallible); + impl super::private_trait::Sealed for $name {} impl<'o> Operation<'o> for $name $operation }; |
