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 fn public(namespace: Str) -> 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 for Visibility
impl PartialEq 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 ==
.impl Eq for Visibility
impl StructuralPartialEq for Visibility
Auto Trait Implementations§
impl Freeze for Visibility
impl RefUnwindSafe for Visibility
impl Send for Visibility
impl Sync for Visibility
impl Unpin for Visibility
impl UnwindSafe for Visibility
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more