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§
Sourcefn set_access<A>(&mut self, access: A)
fn set_access<A>(&mut self, access: A)
Sets the access level.
Provided Methods§
Sourcefn with_access<A>(self, access: A) -> Self
fn with_access<A>(self, access: A) -> Self
Sets the access level.
Sourcefn write_access(&self, b: &mut CodeBuffer)
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.