Function ink_ir::utils::ensure_pub_visibility
source · 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.