X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Foffers%2Foffer.rs;fp=lightning%2Fsrc%2Foffers%2Foffer.rs;h=704045f760b02867e094026a3a0e87816bd82189;hb=1e26a2bc197207be512d905b05595492242b5f90;hp=6b2dfe2aa5359770f18da167732a013a64857d3c;hpb=94a07d9caee6d38d42954ac783c49afe1cf89697;p=rust-lightning diff --git a/lightning/src/offers/offer.rs b/lightning/src/offers/offer.rs index 6b2dfe2a..704045f7 100644 --- a/lightning/src/offers/offer.rs +++ b/lightning/src/offers/offer.rs @@ -185,7 +185,8 @@ impl OfferBuilder { self } - /// Sets the quantity of items for [`Offer::supported_quantity`]. + /// Sets the quantity of items for [`Offer::supported_quantity`]. If not called, defaults to + /// [`Quantity::one`]. /// /// Successive calls to this method will override the previous setting. pub fn supported_quantity(mut self, quantity: Quantity) -> Self { @@ -425,7 +426,8 @@ pub enum Quantity { } impl Quantity { - fn one() -> Self { + /// The default quantity of one. + pub fn one() -> Self { Quantity::Bounded(NonZeroU64::new(1).unwrap()) }