pub struct PagePath {
pub dir: Vec<String>,
pub stem: String,
}Fields§
§dir: Vec<String>§stem: StringImplementations§
Source§impl PagePath
impl PagePath
pub fn from_path_file(path: &str, stem: &str) -> Self
Sourcepub fn follow_relative_link(&self, path: &str, stem: &str) -> Self
pub fn follow_relative_link(&self, path: &str, stem: &str) -> Self
Given a relative link (path and stem), return the new PagePath
obtained by following that link from this PagePath.
If there are too many “..” parts in the path, Some of those will be ignored (we don’t go above the root).
pub fn depth(&self) -> usize
pub fn to_path_buf(&self, parent: &Path, ext: Option<&str>) -> PathBuf
pub fn md_path_buf(&self, parent: &Path) -> PathBuf
pub fn html_path_buf(&self, parent: &Path) -> PathBuf
pub fn is_root_index(&self) -> bool
pub fn to_absolute_url(&self, base_url: &str) -> String
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PagePath
impl<'de> Deserialize<'de> for PagePath
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for PagePath
impl StructuralPartialEq for PagePath
Auto Trait Implementations§
impl Freeze for PagePath
impl RefUnwindSafe for PagePath
impl Send for PagePath
impl Sync for PagePath
impl Unpin for PagePath
impl UnwindSafe for PagePath
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.