Page MenuHomePhorge

docs.rs
No OneTemporary

Size
450 B
Referenced Files
None
Subscribers
None
use pmc::config;
use std::borrow::Cow;
const INDEX: &str = include_str!("../static/index.html");
#[derive(Clone)]
pub struct Docs {
html: Cow<'static, str>,
s_path: String,
}
impl Docs {
pub fn new() -> Self {
let s_path = config::read().get_path().trim_end_matches('/').to_string();
Self { s_path, html: Cow::Borrowed(INDEX) }
}
pub fn render(&self) -> String { self.html.replace("$s_path", &self.s_path) }
}

File Metadata

Mime Type
text/plain
Expires
Sun, Feb 1, 2:08 PM (1 d, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
491793
Default Alt Text
docs.rs (450 B)

Event Timeline