feat: write some cdylib code
This commit is contained in:
@@ -112,5 +112,5 @@ pub struct RequestExtCommand {
|
||||
/// This is the mechanism of clap crate.
|
||||
pub fn parse() -> Request {
|
||||
let cli = Cli::parse();
|
||||
|
||||
todo!()
|
||||
}
|
||||
|
||||
@@ -6,11 +6,12 @@ use toml;
|
||||
|
||||
/// Error occurs in this module.
|
||||
#[derive(Debug, TeError)]
|
||||
#[error("{0}")]
|
||||
pub enum Error {
|
||||
/// Io error
|
||||
#[error("IO error when reading manifest file")]
|
||||
Io(#[from] std::io::Error),
|
||||
/// Toml deserialization error
|
||||
#[error("given TOML manifest file has bad format")]
|
||||
Toml(#[from] toml::de::Error),
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
use crate::cli::Request;
|
||||
use thiserror::Error as TeError;
|
||||
|
||||
/// Error occurs in this module.
|
||||
#[derive(Debug, TeError)]
|
||||
#[error("{0}")]
|
||||
pub enum Error {
|
||||
|
||||
}
|
||||
|
||||
/// Result type used in this module.
|
||||
type Result<T> = std::result::Result<T, Error>;
|
||||
|
||||
// region: Respective Runners
|
||||
|
||||
fn run_register() -> Result<()> {
|
||||
todo!()
|
||||
}
|
||||
|
||||
fn run_unregister() -> Result<()> {
|
||||
todo!()
|
||||
}
|
||||
|
||||
fn run_status() -> Result<()> {
|
||||
todo!()
|
||||
}
|
||||
|
||||
fn run_ext_link() -> Result<()> {
|
||||
todo!()
|
||||
}
|
||||
|
||||
fn run_ext_unlink() -> Result<()> {
|
||||
todo!()
|
||||
}
|
||||
|
||||
fn run_ext_list() -> Result<()> {
|
||||
todo!()
|
||||
}
|
||||
|
||||
|
||||
// endregion
|
||||
|
||||
pub fn run(request: Request) -> Result<()> {
|
||||
todo!()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user