mirror of
https://github.com/aljazceru/cdk.git
synced 2025-12-18 21:25:09 +01:00
Rust docs (#681)
This commit is contained in:
@@ -8,6 +8,7 @@ homepage = "https://github.com/cashubtc/cdk"
|
||||
repository = "https://github.com/cashubtc/cdk.git"
|
||||
rust-version.workspace = true # MSRV
|
||||
license.workspace = true
|
||||
readme = "README.md"
|
||||
|
||||
[[bin]]
|
||||
name = "cdk-payment-processor"
|
||||
|
||||
@@ -2,6 +2,8 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
println!("cargo:rerun-if-changed=src/proto/payment_processor.proto");
|
||||
tonic_build::configure()
|
||||
.protoc_arg("--experimental_allow_proto3_optional")
|
||||
.type_attribute(".", "#[allow(missing_docs)]")
|
||||
.field_attribute(".", "#[allow(missing_docs)]")
|
||||
.compile_protos(&["src/proto/payment_processor.proto"], &["src/proto"])?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
#![doc = include_str!("../README.md")]
|
||||
#![warn(missing_docs)]
|
||||
#![warn(rustdoc::bare_urls)]
|
||||
|
||||
pub mod error;
|
||||
pub mod proto;
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
//! Proto types for payment processor
|
||||
|
||||
use std::str::FromStr;
|
||||
|
||||
use cdk_common::payment::{
|
||||
|
||||
@@ -32,6 +32,7 @@ pub struct PaymentProcessorServer {
|
||||
}
|
||||
|
||||
impl PaymentProcessorServer {
|
||||
/// Create new [`PaymentProcessorServer`]
|
||||
pub fn new(
|
||||
payment_processor: Arc<dyn MintPayment<Err = cdk_common::payment::Error> + Send + Sync>,
|
||||
addr: &str,
|
||||
|
||||
Reference in New Issue
Block a user