#![warn(missing_docs)]
use bon::{bon, builder, Builder};
pub struct MyStruct;
#[bon::bon]
impl MyStruct {
#[builder]
pub fn new() -> Self {
eprintln!("Non-const");
Self
}
}
#[builder]
pub fn function(
_arg1: u32,
_arg2: bool,
) {
eprintln!("Non-const");
}
#[derive(Builder)]
pub struct Struct {
_field1: String,
_field2: usize,
}
#[bon]
impl Struct {
#[builder]
pub fn method(&self, _arg1: u32, _arg2: bool) {
eprintln!("Non-const");
let _ = self;
}
}
#[derive(bon::Builder)]
pub struct GenericStruct<T> {
_field: T,
}