pub enum Mode {
Structure,
Signatures,
Types,
Full,
}Expand description
Output transformation mode
ARCHITECTURE: Modes define what to keep/remove from source code. Each mode has different token reduction characteristics.
Variants§
Structure
Keep structure only - strip all implementation bodies
Token reduction: ~70-80%
Keeps:
- Function/method signatures
- Class declarations
- Type definitions
- Imports/exports
Removes:
- Function bodies (replaced with
/* ... */) - Implementation details
Signatures
Keep only function/method signatures
Token reduction: ~85-92%
More aggressive than Structure mode. Keeps ONLY callable signatures, removes everything else.
Types
Keep only type definitions
Token reduction: ~90-95%
Keeps:
- Type aliases
- Interface declarations
- Enum definitions
Removes:
- All implementation code
- Function bodies
- Class implementations
Full
No transformation - return original source
Token reduction: 0%
Useful for testing and comparing with other modes.
Implementations§
Trait Implementations§
impl Copy for Mode
impl Eq for Mode
impl StructuralPartialEq for Mode
Auto Trait Implementations§
impl Freeze for Mode
impl RefUnwindSafe for Mode
impl Send for Mode
impl Sync for Mode
impl Unpin for Mode
impl UnwindSafe for Mode
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