Skip to content

Conversation

niklasad1
Copy link
Contributor

@niklasad1 niklasad1 commented Apr 1, 2025

This is useful for users that are providing something similar to Infallible for rpcs that returns Infallible.

#[rpc(server, client)]
pub trait Rpc
{
	#[method(name = "say_something)]
	async fn say_something(&self) -> Result<String, Infallible>;
}

@niklasad1 niklasad1 requested a review from a team as a code owner April 1, 2025 15:20
@niklasad1 niklasad1 requested a review from Copilot April 2, 2025 07:43
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a conversion implementation from Infallible to ErrorObject, enabling users to work with RPCs that return Infallible.

  • Introduces an import for Infallible in error.rs
  • Implements From for ErrorObject using an unreachable match

@niklasad1 niklasad1 merged commit 042d8fd into master Apr 2, 2025
10 checks passed
@niklasad1 niklasad1 deleted the na-impl-errorobj-infallible branch April 2, 2025 07:45
@niklasad1 niklasad1 mentioned this pull request Apr 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants