pub struct RustPath(/* private fields */);Expand description
Rust path syntax stored as static metadata.
Implementations§
Source§impl RustPath
impl RustPath
Sourcepub fn new(value: &'static str) -> Result<Self, RustSyntaxError>
pub fn new(value: &'static str) -> Result<Self, RustSyntaxError>
Validates Rust path syntax stored as static metadata.
§Errors
Returns RustSyntaxError when value is not valid Rust path syntax.
Sourcepub const fn from_macro_tokens_unchecked(value: &'static str) -> Self
pub const fn from_macro_tokens_unchecked(value: &'static str) -> Self
Stores Rust path syntax emitted by a trusted macro expansion.
Sourcepub fn parse(self) -> Result<Path, RustSyntaxError>
pub fn parse(self) -> Result<Path, RustSyntaxError>
Parses the stored Rust path syntax.
§Errors
Returns RustSyntaxError when the stored string is not valid Rust path
syntax.
Trait Implementations§
impl Copy for RustPath
impl Eq for RustPath
impl StructuralPartialEq for RustPath
Auto Trait Implementations§
impl Freeze for RustPath
impl RefUnwindSafe for RustPath
impl Send for RustPath
impl Sync for RustPath
impl Unpin for RustPath
impl UnsafeUnpin for RustPath
impl UnwindSafe for RustPath
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