pub(in path)
pub(crate)
pub(super)
pub(self)
In addition to public and private, Rust allows users to declare an item as visible only within a given scope. The rules for pub restrictions are as follows:
pub
path
pub(in super)
pub(in self)
Powered by: C++博客 Copyright © 金慶