Struct erg_compiler::ty::vis::Visibility
source · pub struct Visibility {
pub modifier: VisibilityModifier,
pub def_namespace: Str,
}
Fields§
§modifier: VisibilityModifier
§def_namespace: Str
Implementations§
source§impl Visibility
impl Visibility
pub const DUMMY_PRIVATE: Self = _
pub const DUMMY_PUBLIC: Self = _
pub const BUILTIN_PRIVATE: Self = _
pub const BUILTIN_PUBLIC: Self = _
pub const fn new(modifier: VisibilityModifier, def_namespace: Str) -> Self
pub fn private<S: Into<Str>>(namespace: S) -> Self
pub const fn is_public(&self) -> bool
pub const fn is_private(&self) -> bool
pub fn compatible(&self, access: &AccessModifier, namespace: &Context) -> bool
Trait Implementations§
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 Hash for Visibility
impl Hash for Visibility
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 ==
.