MCPcopy Index your code
hub / github.com/davidpdrsn/extend

github.com/davidpdrsn/extend @v1.2.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.2.0 ↗ · + Follow
79 symbols 96 edges 21 files 0 documented · 0% 26 cross-repo links
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

extend

Crates.io Docs dependency status Build status maintenance-status

Create extensions for types you don't own with extension traits but without the boilerplate.

Example:

use extend::ext;

#[ext]
impl<T: Ord> Vec<T> {
    fn sorted(mut self) -> Self {
        self.sort();
        self
    }
}

fn main() {
    assert_eq!(
        vec![1, 2, 3],
        vec![2, 3, 1].sorted(),
    );
}

Extension points exported contracts — how you extend this code

MyTrait (Interface)
(no doc) [1 implementers]
tests/compile_pass/super_trait.rs
MyTrait (Interface)
(no doc)
tests/compile_fail/supertraits_are_actually_included.rs

Core symbols most depended-on inside this repo

foo
called by 6
tests/compile_pass/extension_on_complex_types.rs
foo
called by 3
tests/compile_pass/async_trait.rs
go
called by 2
src/lib.rs
parse_self_ty
called by 2
src/lib.rs
ext_trait_name
called by 1
src/lib.rs
find_and_combine_idents
called by 1
src/lib.rs
extract_allowed_items
called by 1
src/lib.rs
requires_sized
called by 1
tests/compile_pass/sized.rs

Shape

Method 35
Function 32
Class 9
Interface 2
Enum 1

Languages

Rust100%

Modules by API surface

src/lib.rs20 symbols
tests/compile_pass/sized.rs5 symbols
tests/compile_pass/issue_2.rs4 symbols
tests/compile_pass/hello_world.rs4 symbols
tests/compile_pass/async_trait.rs4 symbols
tests/compile_pass/visibility_config.rs3 symbols
tests/compile_pass/super_trait.rs3 symbols
tests/compile_pass/ref_and_ref_mut.rs3 symbols
tests/compile_pass/pub_impl.rs3 symbols
tests/compile_pass/multiple_generic_params.rs3 symbols
tests/compile_pass/more_than_one_extension.rs3 symbols
tests/compile_pass/extension_on_complex_types.rs3 symbols

For agents

$ claude mcp add extend \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page