Function ink_lang_ir::utils::ensure_pub_visibility[][src]

pub fn ensure_pub_visibility(
    name: &str,
    parent_span: Span,
    vis: &Visibility
) -> Result<(), Error>
Expand description

Ensures that the given visibility is pub and otherwise returns an appropriate error.

Note

The name parameter is given to improve the resulting error message. It denotes the entity which cannot have non-public visibility.