pub struct ModulePath(pub Vec<String>);Expand description
A dotted module path: axon.security ⇔ ["axon", "security"] ⇔
<modules-root>/axon/security.axon.
Tuple Fields§
§0: Vec<String>Implementations§
Source§impl ModulePath
impl ModulePath
Sourcepub fn relative_file(&self) -> PathBuf
pub fn relative_file(&self) -> PathBuf
The root-relative file this path resolves to (axon/security.axon).
Sourcepub fn is_scoped(&self) -> bool
pub fn is_scoped(&self) -> bool
Whether this is the reserved @scope form (first segment keeps its
literal @ prefix, exactly as the parser stores it).
Sourcepub fn from_relative_file(rel: &str) -> Option<ModulePath>
pub fn from_relative_file(rel: &str) -> Option<ModulePath>
Build from a root-relative file path (axon/security.axon →
axon.security). Returns None when a segment is not a valid
module identifier ([A-Za-z_][A-Za-z0-9_]*) or the extension is
not .axon.
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 (const: unstable) · 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
impl Eq 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 (const: unstable) · 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 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