mod grpcurl;
mod http_client;
mod manifest;
mod native;
mod reference;
mod sql;
mod types;
mod wasm;
use std::borrow::Cow;
pub use grpcurl::*;
pub use http_client::*;
pub use manifest::*;
pub use native::*;
pub use reference::*;
pub use sql::*;
pub use types::*;
pub use wasm::*;
use wick_interface_types::{Field, OperationSignatures};
pub trait OperationConfig {
fn name(&self) -> &str;
fn inputs(&self) -> Cow<Vec<Field>>;
fn outputs(&self) -> Cow<Vec<Field>>;
}
pub trait ComponentConfig: OperationSignatures {
type Operation: OperationConfig;
fn operations(&self) -> &[Self::Operation];
fn operations_mut(&mut self) -> &mut Vec<Self::Operation>;
fn get_operation(&self, name: &str) -> Option<&Self::Operation> {
self.operations().iter().find(|o| o.name() == name)
}
}