Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2707200
docs.rs
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
450 B
Referenced Files
None
Subscribers
None
docs.rs
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Sun, Feb 1, 2:08 PM (1 d, 2 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
491793
Default Alt Text
docs.rs (450 B)
Attached To
Mode
rPMC Process Management Controller
Attached
Detach File
Event Timeline
Log In to Comment