mirror of
https://github.com/Astatin3/unshell.git
synced 2026-06-09 06:47:59 -06:00
Remove the old leaf declaration path
Delete the deprecated Leaf derive path, migrate the remaining tests and example to leaf!, and add direct coverage for endpoint-only, TUI-only, and shared-host leaf declarations.
This commit is contained in:
@@ -6,6 +6,8 @@
|
||||
//! - `leaf_tui` builds a placeholder client-side TUI surface
|
||||
|
||||
use rkyv::{Archive, Deserialize, Serialize};
|
||||
#[cfg(not(feature = "leaf_endpoint"))]
|
||||
use std::string::String;
|
||||
|
||||
#[cfg(feature = "leaf_endpoint")]
|
||||
pub mod endpoint;
|
||||
@@ -24,6 +26,23 @@ pub use tui::RemoteShellTui;
|
||||
/// not built, so the leaf declaration still validates its declared inventory.
|
||||
pub struct Open;
|
||||
|
||||
#[cfg(not(feature = "leaf_endpoint"))]
|
||||
#[doc(hidden)]
|
||||
pub struct RemoteShellDeclarationPlaceholder;
|
||||
|
||||
#[cfg(not(feature = "leaf_endpoint"))]
|
||||
impl crate::protocol::tree::ProtocolLeaf for RemoteShellDeclarationPlaceholder {
|
||||
fn leaf_name() -> String {
|
||||
String::from("remote_shell")
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "leaf_endpoint"))]
|
||||
impl crate::protocol::tree::ProcedureMetadata for Open {
|
||||
type Leaf = RemoteShellDeclarationPlaceholder;
|
||||
const PROCEDURE_SUFFIX: &'static str = "open";
|
||||
}
|
||||
|
||||
/// Open-request payload for the remote shell leaf.
|
||||
///
|
||||
/// The shell currently needs no structured arguments, but a named payload type is
|
||||
|
||||
Reference in New Issue
Block a user