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 94a07d9 commit 1e26a2bCopy full SHA for 1e26a2b
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 {
@@ -425,7 +426,8 @@ pub enum Quantity {
425
426
427
428
impl Quantity {
- fn one() -> Self {
429
+ /// The default quantity of one.
430
+ pub fn one() -> Self {
431
Quantity::Bounded(NonZeroU64::new(1).unwrap())
432
433
0 commit comments