Create shorter name for sturct attribute without transfering ownership

I want to do something like this
mojo_model = Model("nickypro/tinyllama-15M")
transformer_weights = mojo_model.transformer_weights^
mojo_model = Model("nickypro/tinyllama-15M")
transformer_weights = mojo_model.transformer_weights^
where transformer_weights is simply an shorter name for mojo_model.transformer_weights but doesn't transfer ownership. However the code above throws the error field 'mojo_model.transformer_weights' destroyed out of the middle of a value, preventing the overall value from being destroyed because the second line transfers ownership. Is there a way to do this in mojo?
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server