MCPcopy Index your code
hub / github.com/DanielKeep/rust-conv

github.com/DanielKeep/rust-conv @v0.3.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.3.1 ↗ · + Follow
83 symbols 131 edges 13 files 31 documented · 37%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

conv

This crate provides a number of conversion traits with more specific semantics than those provided by as or From/Into.

The goal with the traits provided here is to be more specific about what generic code can rely on, as well as provide reasonably self-describing alternatives to the standard From/Into traits. For example, the although T: From<U> might be satisfied in generic code, this says nothing about what kind of conversion that represents.

In addition, From/Into provide no facility for a conversion failing, meaning that implementations may need to choose between conversions that may not be valid, or panicking; neither option is appealing in general.

(Documentation for the master branch.)

Extension points exported contracts — how you extend this code

ApproxScheme (Interface)
This trait is used to mark approximation scheme types. */ [6 implementers]
src/lib.rs
Saturate (Interface)
Saturates a `Result`. */ [3 implementers]
src/errors.rs
Saturated (Interface)
This trait indicates that values of a type can be logically "saturated". This is used by the `errors::UnwrapOrSaturate`
src/misc.rs
ApproxFrom (Interface)
This trait is used to perform a conversion that is permitted to approximate the result, but *not* to wrap or saturate th [3 …
src/lib.rs
UnwrapOk (Interface)
Safely unwrap a `Result` that cannot contain an error. */ [1 implementers]
src/errors.rs
InvalidSentinel (Interface)
This trait indicates that a type has an "invalid" sentinel value. This is used by the `errors::UnwrapOrInvalid` extensi
src/misc.rs
ValueFrom (Interface)
This trait is used to perform an exact, value-preserving conversion. Where possible, prefer *implementing* this trait o [2 …
src/lib.rs
UnwrapOrInf (Interface)
Unwrap a conversion by saturating to infinity. */ [1 implementers]
src/errors.rs

Core symbols most depended-on inside this repo

msg_trace
called by 24
update-docs.py
sh
called by 13
update-docs.py
msg
called by 12
update-docs.py
sh_eval
called by 4
update-docs.py
approx_into
called by 4
src/lib.rs
really_rmtree
called by 3
update-docs.py
value_into
called by 2
src/lib.rs
copytree
called by 1
update-docs.py

Shape

Function 33
Method 23
Interface 17
Enum 10

Languages

Rust89%
Python11%

Modules by API surface

src/lib.rs28 symbols
src/errors.rs14 symbols
tests/lang_ints.rs11 symbols
update-docs.py9 symbols
tests/conv_utils.rs6 symbols
tests/lang_floats.rs4 symbols
tests/derive_try_from.rs3 symbols
src/misc.rs3 symbols
tests/use_in_generics.rs2 symbols
src/impls.rs2 symbols
tests/unwraps.rs1 symbols

For agents

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

⬇ download graph artifact