We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fb1099a commit 179e961Copy full SHA for 179e961
lightning/src/offers/offer.rs
@@ -185,7 +185,8 @@ impl OfferBuilder {
185
self
186
}
187
188
- /// Sets the quantity of items for [`Offer::supported_quantity`].
+ /// Sets the quantity of items for [`Offer::supported_quantity`]. If not called, defaults to
189
+ /// [`Quantity::one`].
190
///
191
/// Successive calls to this method will override the previous setting.
192
pub fn supported_quantity(mut self, quantity: Quantity) -> Self {
@@ -434,7 +435,8 @@ pub enum Quantity {
434
435
436
437
impl Quantity {
- fn one() -> Self {
438
+ /// The default quantity of one.
439
+ pub fn one() -> Self {
440
Quantity::Bounded(NonZeroU64::new(1).unwrap())
441
442
0 commit comments