mirror of
https://github.com/RGBCube/embd-rs
synced 2025-07-26 21:17:44 +00:00
Add docs
This commit is contained in:
parent
907051343d
commit
a6eba8386c
1 changed files with 13 additions and 2 deletions
|
@ -9,8 +9,6 @@ use std::{
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
pub use embed_macros::__dir as dir;
|
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
pub fn __string_runtime(neighbor: &str, path: &str) -> String {
|
pub fn __string_runtime(neighbor: &str, path: &str) -> String {
|
||||||
let base = Path::new(neighbor)
|
let base = Path::new(neighbor)
|
||||||
|
@ -172,3 +170,16 @@ pub fn __dir_runtime(neighbor: &str, path: &str) -> Dir {
|
||||||
path: directory,
|
path: directory,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Embed a directories contents.
|
||||||
|
/// The content value of File will be Borrowed on release,
|
||||||
|
/// and Owned on debug.
|
||||||
|
///
|
||||||
|
/// # Example
|
||||||
|
///
|
||||||
|
/// ```
|
||||||
|
/// fn main() {
|
||||||
|
/// let content = embed::dir!("../assets");
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
pub use embed_macros::__dir as dir;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue