WithAccess

Trait WithAccess 

Source
pub trait WithAccess: Sized {
    // Required methods
    fn access(&self) -> &Access;
    fn set_access<A>(&mut self, access: A)
       where A: Into<Access>;

    // Provided methods
    fn with_access<A>(self, access: A) -> Self
       where A: Into<Access> { ... }
    fn write_access(&self, b: &mut CodeBuffer) { ... }
}
Expand description

An element with an access level.

Required Methods§

Source

fn access(&self) -> &Access

Gets the access level.

Source

fn set_access<A>(&mut self, access: A)
where A: Into<Access>,

Sets the access level.

Provided Methods§

Source

fn with_access<A>(self, access: A) -> Self
where A: Into<Access>,

Sets the access level.

Source

fn write_access(&self, b: &mut CodeBuffer)

Writes the access level.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§