https://github.com/ztgx/cast-rs
A collection of types cast for Rust.
https://github.com/ztgx/cast-rs
box downcast hex rust slicecast str string typecast vec
Last synced: 3 months ago
JSON representation
A collection of types cast for Rust.
- Host: GitHub
- URL: https://github.com/ztgx/cast-rs
- Owner: zTgx
- License: apache-2.0
- Created: 2019-07-04T03:22:35.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-04-12T16:14:20.000Z (about 5 years ago)
- Last Synced: 2025-02-28T06:09:40.954Z (3 months ago)
- Topics: box, downcast, hex, rust, slicecast, str, string, typecast, vec
- Language: Rust
- Homepage:
- Size: 38.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# cast-rs
[](https://travis-ci.org/zTgx/cast-rs) [](https://crates.io/crates/cast-rs)
A collection of types cast for Rust.
`cast-rs` is a meta-crate, re-exporting items from these sub-crates:
| Repository | Crate | Documentation |
| ---------- | ----- | ------------- |
| [hex](https://github.com/KokaKiwi/rust-hex) | [](https://crates.io/crates/hex) |[](https://docs.rs/hex)
| [downcast-rs](https://github.com/marcianx/downcast-rs) | [](https://crates.io/crates/downcast_rs) |[](https://docs.rs/downcast-rs)
| [slice-cast](https://github.com/FaultyRAM/slice-cast.git) | [](https://crates.io/crates/slice_cast) |[](https://docs.rs/slice-cast)Note: `cast-rs` is listed here for reference, but it's not directly included
in `cast-rs`. This is a `proc-macro` crate for deriving some of `cast-rs`'s traits.## Usage
Add this to your `Cargo.toml`:
```toml
[dependencies]
cast-rs = "0.2.1"
```and those to your crate root:
### hex
```rust
use cast_rs::hex;
```### downcast
```rust
use cast_rs::downcast_rs::*;
```### slicecast
```rust
use cast_rs::slice_cast;
```