nu_protocol/plugin/
signature.rsuse crate::{PluginExample, Signature};
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct PluginSignature {
pub sig: Signature,
pub examples: Vec<PluginExample>,
}
impl PluginSignature {
pub fn new(sig: Signature, examples: Vec<PluginExample>) -> Self {
Self { sig, examples }
}
pub fn build(name: impl Into<String>) -> PluginSignature {
let sig = Signature::new(name.into()).add_help();
Self::new(sig, vec![])
}
}