结构体的可见性 参见: 结构体的可见性 结构体对字段的可见性有额外的规定(Structs have an extra level of visibility with their fields)。其可见性默认为私有,也可以加上 pub 修饰语来改变默认属性。只有当从定义在外部的模块访问一个结构体时,这可见性才显得重要,并具有隐藏信息的目的(封装,...
5.1 Information hiding 信息隐藏 5.1 Information hiding 信息隐藏 The most important technique for achieving deep modules is information hiding. This technique was first described by Dav...