summaryrefslogtreecommitdiff
path: root/src/directive/graph.rs
blob: ae900507011ccf7db63cb990ce26715d75efdc40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use crate::directive::{DirectiveImplementation, Processed};
use crate::error::SiteError;
use crate::page::PageMeta;
use crate::site::Site;
use crate::wikitext::ParsedDirective;

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

impl DirectiveImplementation for Graph {
    const REQUIRED: &'static [&'static str] = &[];
    const ALLOWED: &'static [&'static str] = &["src", "type"];
    const ALLOW_ANY_UNNAMED: bool = true;

    fn from_parsed(_: &ParsedDirective) -> Self {
        Self::default()
    }

    fn process(&self, _site: &Site, _meta: &mut PageMeta) -> Result<Processed, SiteError> {
        Err(SiteError::UnimplementedDirective("graph".into()))
    }

}