pub struct SplitPath {
pub to_package: String,
pub within_package: String,
pub is_extern: bool,
}Expand description
A Rust type path split at the target-package boundary.
Returned by CodeGenContext::rust_type_relative_split. The full owned
path is to_package + within_package (concatenated with ::); ancillary
kinds insert their __buffa::<kind>:: prefix between the two halves.
Fields§
§to_package: StringPath from the current emission scope to the target package root.
One of:
- empty (same package, nesting 0)
"super::super"(same package, nesting > 0)"super::…::other_pkg"(cross-package local)"::extern_crate::pkg"(extern type — absolute, nesting-independent)
within_package: StringPath from the target package root to the type itself
(e.g. "Foo" or "outer::Inner").
is_extern: booltrue when to_package is an absolute (::/crate::) extern path.
Extern paths don’t depend on the caller’s nesting depth.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SplitPath
impl RefUnwindSafe for SplitPath
impl Send for SplitPath
impl Sync for SplitPath
impl Unpin for SplitPath
impl UnsafeUnpin for SplitPath
impl UnwindSafe for SplitPath
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