(
&self,
request: tonic::Request<pb::CreateruneRequest>,
)
| 3928 | } |
| 3929 | |
| 3930 | async fn create_rune( |
| 3931 | &self, |
| 3932 | request: tonic::Request<pb::CreateruneRequest>, |
| 3933 | ) -> Result<tonic::Response<pb::CreateruneResponse>, tonic::Status> { |
| 3934 | let req = request.into_inner(); |
| 3935 | let req: requests::CreateruneRequest = req.try_into()?; |
| 3936 | debug!("Client asked for create_rune"); |
| 3937 | trace!("create_rune request: {:?}", req); |
| 3938 | let mut rpc = ClnRpc::new(&self.rpc_path) |
| 3939 | .await |
| 3940 | .map_err(|e| Status::new(Code::Internal, e.to_string()))?; |
| 3941 | let result = rpc.call(Request::CreateRune(req)) |
| 3942 | .await |
| 3943 | .map_err(|e| Status::new( |
| 3944 | Code::Unknown, |
| 3945 | format!("Error calling method CreateRune: {:?}", e)))?; |
| 3946 | match result { |
| 3947 | Response::CreateRune(r) => { |
| 3948 | trace!("create_rune response: {:?}", r); |
| 3949 | Ok(tonic::Response::new(r.into())) |
| 3950 | }, |
| 3951 | r => Err(Status::new( |
| 3952 | Code::Internal, |
| 3953 | format!( |
| 3954 | "Unexpected result {:?} to method call CreateRune", |
| 3955 | r |
| 3956 | ) |
| 3957 | )), |
| 3958 | } |
| 3959 | |
| 3960 | } |
| 3961 | |
| 3962 | async fn show_runes( |
| 3963 | &self, |
nothing calls this directly
no test coverage detected