pub struct AttributeBuilder { /* private fields */ }Expand description
Helper for building Erlang module attributes.
Implementations§
Source§impl AttributeBuilder
impl AttributeBuilder
Add a author attribute.
Sourcepub fn compile(self, option: impl Into<String>) -> Self
pub fn compile(self, option: impl Into<String>) -> Self
Add a compile attribute (e.g., {compile, [debug_info]}).
Sourcepub fn custom(self, key: impl Into<String>, value: impl Into<String>) -> Self
pub fn custom(self, key: impl Into<String>, value: impl Into<String>) -> Self
Add a custom attribute.
Sourcepub fn apply(self, module: &mut BeamModule)
pub fn apply(self, module: &mut BeamModule)
Apply all attributes to a module.
Trait Implementations§
Source§impl Clone for AttributeBuilder
impl Clone for AttributeBuilder
Source§fn clone(&self) -> AttributeBuilder
fn clone(&self) -> AttributeBuilder
Returns a duplicate 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 AttributeBuilder
impl Debug for AttributeBuilder
Source§impl Default for AttributeBuilder
impl Default for AttributeBuilder
Source§fn default() -> AttributeBuilder
fn default() -> AttributeBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AttributeBuilder
impl RefUnwindSafe for AttributeBuilder
impl Send for AttributeBuilder
impl Sync for AttributeBuilder
impl Unpin for AttributeBuilder
impl UnsafeUnpin for AttributeBuilder
impl UnwindSafe for AttributeBuilder
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