pub struct ModulePath {
pub components: Vec<String>,
}Expand description
A dot-separated module path, e.g. Mathlib.Algebra.Ring →
["Mathlib", "Algebra", "Ring"].
Fields§
§components: Vec<String>Ordered components of the path (no empty strings).
Implementations§
Source§impl ModulePath
impl ModulePath
Sourcepub fn parse(s: &str) -> Option<Self>
pub fn parse(s: &str) -> Option<Self>
Parse a dot-separated string into a ModulePath, returning None on
failure. Convenience wrapper around FromStr.
Sourcepub fn to_file_path(&self) -> PathBuf
pub fn to_file_path(&self) -> PathBuf
Convert to a relative file-system path with a .lean extension.
The returned path is relative — callers must prefix with a root.
Mathlib.Algebra.Ring → Mathlib/Algebra/Ring.lean
Sourcepub fn to_oxilean_file_path(&self) -> PathBuf
pub fn to_oxilean_file_path(&self) -> PathBuf
Same as Self::to_file_path but with the .oxilean extension.
Trait Implementations§
Source§impl Clone for ModulePath
impl Clone for ModulePath
Source§fn clone(&self) -> ModulePath
fn clone(&self) -> ModulePath
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ModulePath
impl Debug for ModulePath
Source§impl Display for ModulePath
impl Display for ModulePath
Source§impl FromStr for ModulePath
impl FromStr for ModulePath
Source§impl Hash for ModulePath
impl Hash for ModulePath
Source§impl Ord for ModulePath
impl Ord for ModulePath
Source§fn cmp(&self, other: &ModulePath) -> Ordering
fn cmp(&self, other: &ModulePath) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ModulePath
impl PartialEq for ModulePath
Source§impl PartialOrd for ModulePath
impl PartialOrd for ModulePath
impl Eq for ModulePath
impl StructuralPartialEq for ModulePath
Auto Trait Implementations§
impl Freeze for ModulePath
impl RefUnwindSafe for ModulePath
impl Send for ModulePath
impl Sync for ModulePath
impl Unpin for ModulePath
impl UnsafeUnpin for ModulePath
impl UnwindSafe for ModulePath
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