Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Visibility and pub

Structs and enums

By default, ALL structs and enums in #[diplomat::bridge] have bindings generated. If you wish to hide non-pub bindings, you must add the #[diplomat::skip_private_items] attribute to your module:

#[diplomat::bridge]
#[diplomat::skip_private_items]
mod ffi {
    /// Will be hidden on bindings generation.
    struct Hidden;

    /// Bindings will generate for this struct. 
    pub struct Visible;
}

Methods

Any function that does not have pub is not generated by default.