Skip to content

Commit

Permalink
version, update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
MatsDK committed Aug 11, 2023
1 parent 71857dd commit b084e0e
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ First, add the following crates to your `Cargo.toml`:
# src-tauri/Cargo.toml

[dependencies]
taurpc = "0.2.0"
taurpc = "0.2.1"

specta = { version = "1.0.5", features = ["export"] }
tokio = { version = "1", features = ["full"] }
Expand Down
4 changes: 2 additions & 2 deletions example/src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions taurpc/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions taurpc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "taurpc"
authors = ["MatsDK"]
version = "0.2.0"
version = "0.2.1"
edition = "2021"
description = "A type-safe IPC layer for tauri commands"
documentation = "https://docs.rs/taurpc"
Expand All @@ -18,7 +18,7 @@ members = [
]

[dependencies]
taurpc-macros = { path = "./taurpc-macros", version = "0.2.0" }
taurpc-macros = { path = "./taurpc-macros", version = "0.2.1" }

specta = { version = "1.0.5", features = ["export"] }
tauri = { version = "1.3" }
Expand Down
5 changes: 3 additions & 2 deletions taurpc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@ pub trait TauRpcHandler<R: Runtime>: Sized {
/// Handle a single incoming request
fn handle_incoming_request(self, invoke: Invoke<R>);

/// Handle a single incoming request
/// Spawn a new `tokio` thread that listens for and handles incoming request through a `tokio::broadcast::channel`.
/// This is used for when you have multiple handlers inside a router.
fn spawn(self) -> Sender<Arc<Invoke<tauri::Wry>>>;

/// Get info about that handler that is necessary for generating and exporthing the types on runtime.
/// Returns (trait_name, trait_path_prefix, export_path)
/// Returns `(trait_name, trait_path_prefix, export_path)`
fn handler_info() -> (String, String, Option<String>);

/// Returns a json object containing the arguments for the methods.
Expand Down
2 changes: 1 addition & 1 deletion taurpc/taurpc-macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "taurpc-macros"
version = "0.2.0"
version = "0.2.1"
edition = "2021"
description = "Macros for the taurpc crate"
documentation = "https://docs.rs/taurpc"
Expand Down
2 changes: 1 addition & 1 deletion taurpc/taurpc-macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ pub fn procedures(attrs: TokenStream, item: TokenStream) -> TokenStream {
.into()
}

/// Transforms all methods to return Pin<Box<Future<Output = ...>>>, async traits are not supported.
/// Transforms all methods to return `Pin<Box<Future<Output = ...>>>`, async traits are not supported.
#[proc_macro_attribute]
pub fn resolvers(_attr: TokenStream, item: TokenStream) -> TokenStream {
let mut item = syn::parse_macro_input!(item as ItemImpl);
Expand Down

0 comments on commit b084e0e

Please sign in to comment.