1
0
mirror of https://github.com/sharkdp/bat synced 2026-08-04 19:01:44 +00:00

Initial prototype for Lua plugins

This commit is contained in:
David Peter
2022-05-29 20:38:58 +02:00
parent 3339eee2dc
commit 3811615606
8 changed files with 119 additions and 6 deletions
+7 -5
View File
@@ -69,7 +69,8 @@ impl InputDescription {
}
}
pub(crate) enum InputKind<'a> {
pub enum InputKind<'a> {
// TODO
OrdinaryFile(PathBuf),
StdIn,
CustomReader(Box<dyn Read + 'a>),
@@ -86,14 +87,15 @@ impl<'a> InputKind<'a> {
}
#[derive(Clone, Default)]
pub(crate) struct InputMetadata {
pub(crate) user_provided_name: Option<PathBuf>,
pub struct InputMetadata {
// TODO
pub user_provided_name: Option<PathBuf>,
pub(crate) size: Option<u64>,
}
pub struct Input<'a> {
pub(crate) kind: InputKind<'a>,
pub(crate) metadata: InputMetadata,
pub kind: InputKind<'a>, // TODO
pub metadata: InputMetadata, // TODO
pub(crate) description: InputDescription,
}