linked-structs-core-0.rs/src/links.rs

12 lines
343 B
Rust

pub trait LinkedStructLinksTypeProvider {
type Links: Sized;
}
pub trait LinkedStructLinksOffset: LinkedStructLinksTypeProvider {
type Node;
fn getLinks<R>(nodeRef: &Self::Node, consumer: impl FnOnce(&Self::Links) -> R) -> R;
fn getLinksMut<R>(nodeRef: &mut Self::Node, consumer: impl FnOnce(&mut Self::Links) -> R) -> R;
}