telegram_bot2/builder.rs
1/// Definer a builder for a given structure
2///
3/// The builder should be derived with [`#[derive(Builder)]`](macro@crate::Builder)\
4/// It will have the following properties:
5/// - A new() function, with parameters for each non-optional field of the structure
6/// - A method for each optional parameter to initialize that field. It returns self to allow chained calls
7pub trait Builder {
8 /// Type to be built
9 type Value;
10
11 /// Converts the builder into the built value
12 fn build(self) -> Self::Value;
13}