danielhenrymantilla / rust-uninit

Read trait fixed to soundly work with uninitalized memory
MIT License
25 stars 2 forks source link

Usage when storing `Out` in a struct #8

Open PSeitz opened 1 year ago

PSeitz commented 1 year ago

I tried these two variants without success. Is this something that's supported?

struct Keep<'a>{
   out: Out<'a>` 
}

struct Keep<'a>{
   out: &mut Out<'a>` 
}
kupiakos commented 10 months ago

This needs to specify a T value for what the out reference should write, like:

struct Keep<'a> {
    out: Out<'a, u32>,
}

or

struct Keep<'a, T> {
    out: Out<'a, T>,
}