pub struct ModuleIdentifier {
pub main_name: String,
pub rest: Option<Vec<String>>,
}Fields§
§main_name: String§rest: Option<Vec<String>>Implementations§
Source§impl ModuleIdentifier
impl ModuleIdentifier
Sourcepub fn file_name(&self) -> String
pub fn file_name(&self) -> String
File name is always the last part of the identifier. If only one part is present file name defaults to lib.roan
Sourcepub fn parse_module_identifier(spec: &str) -> Option<ModuleIdentifier>
pub fn parse_module_identifier(spec: &str) -> Option<ModuleIdentifier>
Checks if spec is a module identifier and parses it. Module identifier consists of a main name and a sub name separated by a ::.
“std::io” -> build/deps/std/io.roan
“std::io::file” -> build/deps/std/io/file.roan
“some_dep” -> build/deps/some_dep/lib.roan
“std” -> build/deps/std/lib.roan
§Arguments
spec- A string slice that represents the specification of the path to check.
§Returns
A boolean value indicating whether the spec is a module identifier.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ModuleIdentifier
impl RefUnwindSafe for ModuleIdentifier
impl Send for ModuleIdentifier
impl Sync for ModuleIdentifier
impl Unpin for ModuleIdentifier
impl UnwindSafe for ModuleIdentifier
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