#[repr(u8)]
pub enum Visibility {
Private,
Public,
Script,
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.
Script
Accessible by any script or other Script
functions from any module
Friend
Accessible by this module as well as modules declared in the friend list.
Trait Implementations§
source§impl Arbitrary for Visibility
impl Arbitrary for Visibility
§type Parameters = ()
type Parameters = ()
The type of parameters that
arbitrary_with
accepts for configuration
of the generated Strategy
. Parameters must implement Default
.§type Strategy = TupleUnion<((u32, Arc<fn() -> Visibility>), (u32, Arc<fn() -> Visibility>), (u32, Arc<fn() -> Visibility>), (u32, Arc<fn() -> Visibility>))>
type Strategy = TupleUnion<((u32, Arc<fn() -> Visibility>), (u32, Arc<fn() -> Visibility>), (u32, Arc<fn() -> Visibility>), (u32, Arc<fn() -> Visibility>))>
The type of
Strategy
used to generate values of type Self
.source§fn arbitrary_with(_top: Self::Parameters) -> Self::Strategy
fn arbitrary_with(_top: Self::Parameters) -> Self::Strategy
source§impl Clone for Visibility
impl Clone for Visibility
source§fn clone(&self) -> Visibility
fn clone(&self) -> Visibility
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for Visibility
impl Debug for Visibility
source§impl Default for Visibility
impl Default for Visibility
source§impl Ord for Visibility
impl Ord for Visibility
source§fn cmp(&self, other: &Visibility) -> Ordering
fn cmp(&self, other: &Visibility) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<Visibility> for Visibility
impl PartialEq<Visibility> for Visibility
source§fn eq(&self, other: &Visibility) -> bool
fn eq(&self, other: &Visibility) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<Visibility> for Visibility
impl PartialOrd<Visibility> for Visibility
source§fn partial_cmp(&self, other: &Visibility) -> Option<Ordering>
fn partial_cmp(&self, other: &Visibility) -> Option<Ordering>
1.0.0 · source§fn 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