pub struct Exports {
pub funcs: Vec<String>,
pub types: Vec<String>,
pub consts: Vec<String>,
}Expand description
Single-file EXPORT metadata: per-kind names in source order.
Separate lists (never one mixed vec) so the MCP server never
confuses a type for a tool, and reads stay kind-addressed.
Fields§
§funcs: Vec<String>§types: Vec<String>§consts: Vec<String>Implementations§
Source§impl Exports
impl Exports
Sourcepub fn insert(&mut self, kind: ExportKind, name: String) -> Result<(), String>
pub fn insert(&mut self, kind: ExportKind, name: String) -> Result<(), String>
Record one EXPORT name, enforcing the duplicate rule.
Uniqueness is by exported base name for every kind: EXPORT FOO
and EXPORT LIB::FOO name one servable tool, EXPORT CONST $N
and EXPORT CONST $A::N name one read, so the second spelling
shapes the same duplicate EXPORT instead of silently
shadowing. One base name rides exactly one export kind.
Err carries the duplicate EXPORT message unchanged.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Exports
impl Freeze for Exports
impl Move for Exports
impl RefUnwindSafe for Exports
impl Send for Exportswhere
RawVecInner: Send,
impl Sync for Exportswhere
RawVecInner: Sync,
impl Unpin for Exports
impl UnsafeUnpin for Exports
impl UnwindSafe for Exportswhere
RawVecInner: UnwindSafe,
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