1
#![doc = include_str!("../README.md")]
2
// @@ begin lint list maintained by maint/add_warning @@
3
#![allow(renamed_and_removed_lints)] // @@REMOVE_WHEN(ci_arti_stable)
4
#![allow(unknown_lints)] // @@REMOVE_WHEN(ci_arti_nightly)
5
#![warn(missing_docs)]
6
#![warn(noop_method_call)]
7
#![warn(unreachable_pub)]
8
#![warn(clippy::all)]
9
#![deny(clippy::await_holding_lock)]
10
#![deny(clippy::cargo_common_metadata)]
11
#![deny(clippy::cast_lossless)]
12
#![deny(clippy::checked_conversions)]
13
#![warn(clippy::cognitive_complexity)]
14
#![deny(clippy::debug_assert_with_mut_call)]
15
#![deny(clippy::exhaustive_enums)]
16
#![deny(clippy::exhaustive_structs)]
17
#![deny(clippy::expl_impl_clone_on_copy)]
18
#![deny(clippy::fallible_impl_from)]
19
#![deny(clippy::implicit_clone)]
20
#![deny(clippy::large_stack_arrays)]
21
#![warn(clippy::manual_ok_or)]
22
#![deny(clippy::missing_docs_in_private_items)]
23
#![warn(clippy::needless_borrow)]
24
#![warn(clippy::needless_pass_by_value)]
25
#![warn(clippy::option_option)]
26
#![deny(clippy::print_stderr)]
27
#![deny(clippy::print_stdout)]
28
#![warn(clippy::rc_buffer)]
29
#![deny(clippy::ref_option_ref)]
30
#![warn(clippy::semicolon_if_nothing_returned)]
31
#![warn(clippy::trait_duplication_in_bounds)]
32
#![deny(clippy::unchecked_duration_subtraction)]
33
#![deny(clippy::unnecessary_wraps)]
34
#![warn(clippy::unseparated_literal_suffix)]
35
#![deny(clippy::unwrap_used)]
36
#![allow(clippy::let_unit_value)] // This can reasonably be done for explicitness
37
#![allow(clippy::uninlined_format_args)]
38
#![allow(clippy::significant_drop_in_scrutinee)] // arti/-/merge_requests/588/#note_2812945
39
#![allow(clippy::result_large_err)] // temporary workaround for arti#587
40
#![allow(clippy::needless_raw_string_hashes)] // complained-about code is fine, often best
41
//! <!-- @@ end lint list maintained by maint/add_warning @@ -->
42

            
43
mod cancel;
44
mod codecs;
45
mod connection;
46
mod err;
47
mod globalid;
48
mod mgr;
49
mod msgs;
50
mod objmap;
51
mod session;
52
mod stream;
53

            
54
pub use connection::{auth::RpcAuthentication, Connection, ConnectionError};
55
pub use mgr::RpcMgr;
56
pub use session::RpcSession;
57

            
58
/// Return a list of RPC methods that will be needed to use `arti-rpcserver` with the given runtime.
59
pub fn rpc_methods<R: tor_rtcompat::Runtime>() -> Vec<tor_rpcbase::dispatch::InvokerEnt> {
60
    tor_rpcbase::invoker_ent_list![
61
        crate::stream::new_stream_handle_on_client::<R>, //
62
    ]
63
}