enum Visibility
Visibility of a field or method as seen by comptime reflection (§2.3, §15.2, D-1908).
Example:
data Account {
pub(api) id: i64
secret: str
}
fn main() io {
inline for f in reflect(Account).fields {
print("{f.name} public={f.visibility == Visibility.PubApi}")
}
}Output
id public=true secret public=false
pub(api) enum VisibilitySince. 1.0.0-beta
Variants
Private | Visible in the declaring module only. |
Pub | Visible in the package. |
PubApi | Part of the public API of the package. |
Defined in: std/core/types.oxl:615