concision_transformer/codec/
decoder.rs

1/*
2    Appellation: decoder <module>
3    Contrib: FL03 <jo3mccain@icloud.com>
4*/
5pub use self::{config::DecoderConfig, layer::DecoderLayer};
6
7pub mod config;
8pub mod layer;
9
10#[derive(Default)]
11pub struct Decoder {
12    config: DecoderConfig,
13    layers: Vec<DecoderLayer>,
14}
15
16impl Decoder {
17    pub fn new() -> Self {
18        Self {
19            config: DecoderConfig::default(),
20            layers: Vec::new(),
21        }
22    }
23
24    pub const fn config(&self) -> &DecoderConfig {
25        &self.config
26    }
27
28    pub fn layers(&self) -> &[DecoderLayer] {
29        &self.layers
30    }
31}