Enum move_binary_format::file_format::Visibility
source · [−]#[repr(u8)]
pub enum Visibility {
Private,
Public,
Friend,
}
Expand description
Visibility
restricts the accessibility of the associated entity.
- For function visibility, it restricts who may call into the associated function.
Variants
Private
Accessible within its defining module only.
Public
Accessible by any module or script outside of its declaring module.
Friend
Accessible by this module as well as modules declared in the friend list.
Implementations
sourceimpl Visibility
impl Visibility
pub const DEPRECATED_SCRIPT: u8 = 2u8
Trait Implementations
sourceimpl Clone for Visibility
impl Clone for Visibility
sourcefn clone(&self) -> Visibility
fn clone(&self) -> Visibility
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for Visibility
impl Debug for Visibility
sourceimpl Default for Visibility
impl Default for Visibility
sourceimpl<'de> Deserialize<'de> for Visibility
impl<'de> Deserialize<'de> for Visibility
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Ord for Visibility
impl Ord for Visibility
sourcefn cmp(&self, other: &Visibility) -> Ordering
fn cmp(&self, other: &Visibility) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<Visibility> for Visibility
impl PartialEq<Visibility> for Visibility
sourceimpl PartialOrd<Visibility> for Visibility
impl PartialOrd<Visibility> for Visibility
sourcefn partial_cmp(&self, other: &Visibility) -> Option<Ordering>
fn partial_cmp(&self, other: &Visibility) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl Serialize for Visibility
impl Serialize for Visibility
sourceimpl TryFrom<u8> for Visibility
impl TryFrom<u8> for Visibility
impl Copy for Visibility
impl Eq for Visibility
impl StructuralEq for Visibility
impl StructuralPartialEq for Visibility
Auto Trait Implementations
impl RefUnwindSafe for Visibility
impl Send for Visibility
impl Sync for Visibility
impl Unpin for Visibility
impl UnwindSafe for Visibility
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more