borrow 2.0.0

Zero-overhead, safe implementation of partial borrows. This crate allows you to borrow selected fields from a struct and split structs into non-overlapping sets of borrowed fields.
Documentation
1
2
3
4
5
6
7
8
9
// =================
// === HasFields ===
// =================

use crate::hlist;

pub trait HasFields { type Fields; }
pub type Fields<T> = <T as HasFields>::Fields;
pub type FieldAt<N, T> = hlist::ItemAt<N, Fields<T>>;