Open zbraniecki opened 4 years ago
Could you add an example and/or doc on how to use owning-ref to store a struct as a field on a struct next to the owned value.
owning-ref
A use case I have is a struct storing a String and "view" into that string (AST): https://github.com/projectfluent/fluent-rs/blob/master/fluent-bundle/src/resource.rs#L5-L14
String
I looked around the docs of owning-ref but can't find an example of how is that intended to work in owning-ref API.
Could you add an example and/or doc on how to use
owning-ref
to store a struct as a field on a struct next to the owned value.A use case I have is a struct storing a
String
and "view" into that string (AST): https://github.com/projectfluent/fluent-rs/blob/master/fluent-bundle/src/resource.rs#L5-L14I looked around the docs of
owning-ref
but can't find an example of how is that intended to work inowning-ref
API.