The opts field
The opts field in the invocation of the statue::initialize_elements macro like this one:
#![allow(unused)] fn main() { initialize_elements!( html: "../index.html", elements: { let header = Single("h1"); let name_input = Single("#name-input"); }, opts: { window_ret_ty: Some(RcT), document_ret_ty: None } ); }
is always a sequence of tokens resembling an object. It is optional and can be omitted. If present, it must follow after the elements field.
If defined, the opts field's object must contain both of the following fields:
window_ret_ty- an optional field that can be either (1)Noneor (2)Somewith the "return type kind" for thewindowvariable.document_ret_ty- an optional field that can be either (1)Noneor (2)Somewith the "return type kind" for thedocumentvariable.
You can learn more about return type kinds in the dedicated section.