create_token

Macro create_token 

Source
macro_rules! create_token {
    (
        $(#[$struct_meta:meta])*
        $v:vis struct $token_name:ident<'ui>;

        $(#[$end_meta:meta])*
        drop { $on_drop:expr }
    ) => { ... };
}
Expand description

This is a macro used internally by dear-imgui to create StackTokens representing various global state in Dear ImGui.

These tokens can either be allowed to drop or dropped manually by calling end on them. Preventing this token from dropping, or moving this token out of the block it was made in can have unintended side effects, including failed asserts in the Dear ImGui C++.

In general, if you’re looking at this, don’t overthink these – just slap a _token as their binding name and allow them to drop.