Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 2 days 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 (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-04-12T16:14:20.000Z (almost 5 years ago)
- Last Synced: 2025-01-02T01:41:15.601Z (14 days 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
[![Travis status](https://travis-ci.org/zTgx/cast-rs.svg?branch=master)](https://travis-ci.org/zTgx/cast-rs) [![crate](https://img.shields.io/crates/v/cast-rs.svg)](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) | [![crate](https://img.shields.io/crates/v/hex.svg)](https://crates.io/crates/hex) |[![documentation](https://docs.rs/hex/badge.svg)](https://docs.rs/hex)
| [downcast-rs](https://github.com/marcianx/downcast-rs) | [![crate](https://img.shields.io/crates/v/downcast_rs.svg)](https://crates.io/crates/downcast_rs) |[![documentation](https://docs.rs/downcast-rs/badge.svg)](https://docs.rs/downcast-rs)
| [slice-cast](https://github.com/FaultyRAM/slice-cast.git) | [![crate](https://img.shields.io/crates/v/slice_cast.svg)](https://crates.io/crates/slice_cast) |[![documentation](https://docs.rs/slice-cast/badge.svg)](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;
```