Open CocDap opened 7 months ago
pub
là fn được publish cho toàn bộ crate và cả những crate khác khi import cũng có thể sử dụng.pub(crate)
tương tự như pub
nhưng lúc này các crate khác không thể sử dụng.pub(super)
sẽ chỉ publish cho module parent được thấy và sử dụng, các module khác không thể sử dụng.@zrus thêm tí ví dụ thì tuyệt vời
Ví dụ: Sử dụng
pub
Sử dụng mặc định
Sử dụng
pub(crate)
Sử dụng
pub(super)