mirror of
https://mzte.de/git/LordMZTE/sercon.git
synced 2024-05-19 07:23:54 +02:00
25 lines
555 B
Rust
25 lines
555 B
Rust
use sercon_base::Backend;
|
|
|
|
use crate::backends::*;
|
|
|
|
pub mod backends;
|
|
|
|
pub trait FiletypeBackend: Backend {
|
|
fn supported_filetypes(&self) -> Vec<String>;
|
|
fn as_backend(&self) -> &dyn Backend;
|
|
}
|
|
|
|
pub fn all() -> Vec<Box<dyn FiletypeBackend>> {
|
|
vec![
|
|
Box::new(BincodeBackend),
|
|
Box::new(CborBackend),
|
|
Box::new(JsonBackend),
|
|
Box::new(NbtBackend),
|
|
Box::new(RonBackend),
|
|
Box::new(SExpressionBackend),
|
|
Box::new(TomlBackend),
|
|
Box::new(XmlBackend),
|
|
Box::new(YamlBackend),
|
|
]
|
|
}
|