summaryrefslogtreecommitdiff
path: root/src/directive/inline.rs
blob: efaf7eedb0a397fb63d3974f4c82dde9cfa1dd93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
use crate::error::SiteError;
use crate::page::PageMeta;
use crate::site::Site;
use crate::wikitext::ParsedDirective;

#[derive(Debug, Default, Eq, PartialEq)]
pub struct Inline {}

impl Inline {
    pub const REQUIRED: &'static [&'static str] = &["pages"];
    pub const ALLOWED: &'static [&'static str] = &[
        "actions",
        "archive",
        "description",
        "feedlimit",
        "feeds",
        "feedshow",
        "limit",
        "sort",
        "template",
        "trail",
    ];
    pub const ALLOW_ANY_UNNAMED: bool = true;

    pub fn new() -> Self {
        Self::default()
    }

    pub fn process(&self, _site: &Site, _meta: &mut PageMeta) -> Result<String, SiteError> {
        Ok("FIXME:inline".into())
    }
}

impl From<ParsedDirective> for Inline {
    fn from(_p: ParsedDirective) -> Self {
        Inline::new()
    }
}