cycles-quartz/cli/src/request.rs
Shoaib Ahmed 2afbe50f76
feat(cli): setup skeleton for quartz tool (#105)
Co-authored-by: Thane Thomson <connect@thanethomson.com>
2024-07-23 11:35:38 +02:00

20 lines
406 B
Rust

use crate::{cli::Command, error::Error, request::init::InitRequest};
pub mod init;
#[derive(Clone, Debug)]
pub enum Request {
Init(InitRequest),
}
impl TryFrom<Command> for Request {
type Error = Error;
fn try_from(cmd: Command) -> Result<Self, Self::Error> {
match cmd {
Command::Init { path } => InitRequest::try_from(path),
}
.map(Into::into)
}
}