Expand description
RPC connection support, mainloop, and protocol implementation.
Re-exportsΒ§
use std::collections::HashMap;πuse std::io::Error as IoError;πuse std::pin::Pin;πuse std::sync::Arc;πuse std::sync::Mutex;πuse std::sync::RwLock;πuse std::sync::Weak;πuse asynchronous_codec::JsonCodecError;πuse derive_deftly::Deftly;πuse futures::AsyncWriteExt as _;πuse futures::FutureExt;πuse futures::Sink;πuse futures::SinkExt as _;πuse futures::StreamExt;πuse futures::channel::mpsc;πuse futures::stream::FusedStream;πuse futures::stream::FuturesUnordered;πuse rpc::dispatch::BoxedUpdateSink;πuse serde_json::error::Category as JsonErrorCategory;πuse tor_async_utils::SinkExt as _;πuse tor_async_utils::mpsc_channel_no_memquota;πuse crate::RpcAuthentication;πuse crate::cancel;πuse crate::cancel::Cancel;πuse crate::cancel::CancelHandle;πuse crate::err::RequestParseError;πuse crate::globalid::GlobalId;πuse crate::globalid::MacKey;πuse crate::msgs::BoxedResponse;πuse crate::msgs::FlexibleRequest;πuse crate::msgs::ReqMeta;πuse crate::msgs::Request;πuse crate::msgs::RequestId;πuse crate::msgs::ResponseBody;πuse crate::objmap::GenIdx;πuse crate::objmap::ObjMap;πuse tor_rpcbase as rpc;πuse tor_rpcbase::RpcError;πuse tor_rpcbase::templates::*;π
ModulesΒ§
- auth π
- RPC commands and related functionality for authentication.
- methods π
- Implementations for methods on Connection.
StructsΒ§
- Connection
- An open connection from an RPC client.
- Connection
Id π - A random value used to identify an connection.
- Inner π
- The inner, lock-protected part of an RPC connection.
- Missing
Features πError - An error returned when an RPC request lists some feature as required, but we donβt have every such feature.
- Request
Cancelled π - An error given when an RPC request is cancelled.
EnumsΒ§
- Cancel
Error π - An error given when we attempt to cancel an RPC request, but cannot.
- Connection
Error - A failure that results in closing a
Connection.
ConstantsΒ§
- UPDATE_
CHAN_ πSIZE - How many updates can be pending, per connection, before they start to block?
Type AliasesΒ§
- Boxed
Request πStream - A type-erased
FusedStreamyieldingRequests. - Boxed
Response πSink - A type-erased
SinkacceptingBoxedResponses. - Session
Factory π - A function we use to construct Session objects in response to authentication.