pub struct ClientServerRemote<R: Ratchet> { /* private fields */ }Expand description
A limited version of the NodeRemote designed to only allow shutdown calls to the protocol
as well as several other functions
Implementations§
Source§impl<R: Ratchet> ClientServerRemote<R>
impl<R: Ratchet> ClientServerRemote<R>
Sourcepub fn new(
conn_type: VirtualTargetType,
remote: NodeRemote<R>,
session_security_settings: SessionSecuritySettings,
unprocessed_signals_rx: Option<UnboundedReceiver<NodeResult<R>>>,
file_transfer_handle_rx: Option<FileTransferHandleRx>,
) -> Self
pub fn new( conn_type: VirtualTargetType, remote: NodeRemote<R>, session_security_settings: SessionSecuritySettings, unprocessed_signals_rx: Option<UnboundedReceiver<NodeResult<R>>>, file_transfer_handle_rx: Option<FileTransferHandleRx>, ) -> Self
constructs a new ClientServerRemote from a ClientServerRemote and a VirtualTargetType
Sourcepub fn get_unprocessed_signals_receiver(
&self,
) -> Option<UnboundedReceiver<NodeResult<R>>>
pub fn get_unprocessed_signals_receiver( &self, ) -> Option<UnboundedReceiver<NodeResult<R>>>
Can only be called once per remote. Allows receiving events
Sourcepub fn get_incoming_file_transfer_handle(
&self,
) -> Result<FileTransferHandleRx, NetworkError>
pub fn get_incoming_file_transfer_handle( &self, ) -> Result<FileTransferHandleRx, NetworkError>
Obtains a receiver which yields incoming file/object transfer handles
Source§impl<R: Ratchet> ClientServerRemote<R>
impl<R: Ratchet> ClientServerRemote<R>
Sourcepub async fn shutdown_kernel(&self) -> Result<(), NetworkError>
pub async fn shutdown_kernel(&self) -> Result<(), NetworkError>
Gracefully closes the protocol and kernel executor
pub async fn get_peers( &self, limit: Option<usize>, ) -> Result<Vec<LocalGroupPeer>, NetworkError>
Methods from Deref<Target = NodeRemote<R>>§
pub fn rebind_local(&self) -> Result<RebindReport, NetworkError>
pub fn rebind_local(&self) -> Result<RebindReport, NetworkError>
Moves every client-role QUIC endpoint this node holds (C2S QUIC, and the dialing side of
direct and TURN P2P paths) to a fresh socket on the current local address, so their
connections migrate without a new handshake. Call it when the local network changes.
Local only: nothing crosses the wire. See proto::misc::local_rebind for what cannot move.
pub async fn send_with_custom_ticket(
&self,
ticket: Ticket,
request: NodeRequest,
) -> Result<(), NetworkError>
pub async fn send_with_custom_ticket( &self, ticket: Ticket, request: NodeRequest, ) -> Result<(), NetworkError>
Sends a request to the server with a custom ticket.
pub async fn send(&self, request: NodeRequest) -> Result<Ticket, NetworkError>
pub async fn send(&self, request: NodeRequest) -> Result<Ticket, NetworkError>
Sends a request to the server and returns a ticket for tracking the response.
pub async fn send_callback_subscription(
&self,
request: NodeRequest,
) -> Result<KernelStreamSubscription<R>, NetworkError>
pub async fn send_callback_subscription( &self, request: NodeRequest, ) -> Result<KernelStreamSubscription<R>, NetworkError>
Convenience method for sending and awaiting for a response for the related ticket
pub async fn shutdown(&self) -> Result<(), NetworkError>
pub async fn shutdown(&self) -> Result<(), NetworkError>
Safely shutsdown the internal server
pub fn get_next_ticket(&self) -> Ticket
pub fn try_send_with_custom_ticket( &self, ticket: Ticket, request: NodeRequest, ) -> Result<(), TrySendError<(NodeRequest, Ticket)>>
pub fn try_send( &self, request: NodeRequest, ) -> Result<(), TrySendError<(NodeRequest, Ticket)>>
pub fn local_node_type(&self) -> &NodeType
pub fn account_manager(&self) -> &AccountManager<R, R>
Trait Implementations§
Source§impl<R: Clone + Ratchet> Clone for ClientServerRemote<R>
impl<R: Clone + Ratchet> Clone for ClientServerRemote<R>
Source§fn clone(&self) -> ClientServerRemote<R>
fn clone(&self) -> ClientServerRemote<R>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<R: Ratchet> Deref for ClientServerRemote<R>
impl<R: Ratchet> Deref for ClientServerRemote<R>
Source§impl<R: Ratchet> DerefMut for ClientServerRemote<R>
impl<R: Ratchet> DerefMut for ClientServerRemote<R>
Source§impl<R: Ratchet> ProtocolRemoteExt<R> for ClientServerRemote<R>
impl<R: Ratchet> ProtocolRemoteExt<R> for ClientServerRemote<R>
Source§fn register<'life0, 'async_trait, T, P, V, K>(
&'life0 self,
addr: T,
full_name: P,
username: V,
proposed_password: K,
default_security_settings: SessionSecuritySettings,
server_password: Option<PreSharedKey>,
) -> Pin<Box<dyn Future<Output = Result<RegisterSuccess, NetworkError>> + Send + 'async_trait>>
fn register<'life0, 'async_trait, T, P, V, K>( &'life0 self, addr: T, full_name: P, username: V, proposed_password: K, default_security_settings: SessionSecuritySettings, server_password: Option<PreSharedKey>, ) -> Pin<Box<dyn Future<Output = Result<RegisterSuccess, NetworkError>> + Send + 'async_trait>>
Source§fn register_admitted<'life0, 'async_trait, T, P, V, K>(
&'life0 self,
addr: T,
full_name: P,
username: V,
proposed_password: K,
default_security_settings: SessionSecuritySettings,
server_password: Option<PreSharedKey>,
admission: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<RegisterSuccess, NetworkError>> + Send + 'async_trait>>
fn register_admitted<'life0, 'async_trait, T, P, V, K>( &'life0 self, addr: T, full_name: P, username: V, proposed_password: K, default_security_settings: SessionSecuritySettings, server_password: Option<PreSharedKey>, admission: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<RegisterSuccess, NetworkError>> + Send + 'async_trait>>
register, carrying an admission token (a Turnstile response) for a
server that asks fresh registrations for one. A refusal is a PqSignInAdmissionRequired
or PqSignInAdmissionFailed error.Source§fn register_to_endpoint<'life0, 'async_trait, P, V, K>(
&'life0 self,
endpoint: WebSocketEndpoint,
full_name: P,
username: V,
proposed_password: K,
default_security_settings: SessionSecuritySettings,
server_password: Option<PreSharedKey>,
) -> Pin<Box<dyn Future<Output = Result<RegisterSuccess, NetworkError>> + Send + 'async_trait>>
fn register_to_endpoint<'life0, 'async_trait, P, V, K>( &'life0 self, endpoint: WebSocketEndpoint, full_name: P, username: V, proposed_password: K, default_security_settings: SessionSecuritySettings, server_password: Option<PreSharedKey>, ) -> Pin<Box<dyn Future<Output = Result<RegisterSuccess, NetworkError>> + Send + 'async_trait>>
wss://org.example.net/, or
ws://host:port/path) rather than at an address of its own: a server behind an HTTP edge,
which is told apart from the edge’s other servers by hostname and path. The account
remembers the URL, so a later connect with credentials dials it too.Source§fn register_to_endpoint_admitted<'life0, 'async_trait, P, V, K>(
&'life0 self,
endpoint: WebSocketEndpoint,
full_name: P,
username: V,
proposed_password: K,
default_security_settings: SessionSecuritySettings,
server_password: Option<PreSharedKey>,
admission: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<RegisterSuccess, NetworkError>> + Send + 'async_trait>>
fn register_to_endpoint_admitted<'life0, 'async_trait, P, V, K>( &'life0 self, endpoint: WebSocketEndpoint, full_name: P, username: V, proposed_password: K, default_security_settings: SessionSecuritySettings, server_password: Option<PreSharedKey>, admission: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<RegisterSuccess, NetworkError>> + Send + 'async_trait>>
register_to_endpoint, carrying an admission token.Source§fn server_endpoint<'life0, 'async_trait>(
&'life0 self,
cid: u64,
) -> Pin<Box<dyn Future<Output = Result<Option<WebSocketEndpoint>, NetworkError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn server_endpoint<'life0, 'async_trait>(
&'life0 self,
cid: u64,
) -> Pin<Box<dyn Future<Output = Result<Option<WebSocketEndpoint>, NetworkError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
cid registered to (see
register_to_endpoint), or None when its server is the
address in its connection info. Behind an HTTP edge that address is one of the edge’s,
shared with every other server there, so it does not identify the server; this does.Source§fn register_with_defaults<'life0, 'async_trait, T, P, V, K>(
&'life0 self,
addr: T,
full_name: P,
username: V,
proposed_password: K,
) -> Pin<Box<dyn Future<Output = Result<RegisterSuccess, NetworkError>> + Send + 'async_trait>>
fn register_with_defaults<'life0, 'async_trait, T, P, V, K>( &'life0 self, addr: T, full_name: P, username: V, proposed_password: K, ) -> Pin<Box<dyn Future<Output = Result<RegisterSuccess, NetworkError>> + Send + 'async_trait>>
Source§fn connect<'life0, 'async_trait>(
&'life0 self,
auth: AuthenticationRequest,
connect_mode: ConnectMode,
udp_mode: UdpMode,
keep_alive_timeout: Option<Duration>,
session_security_settings: SessionSecuritySettings,
server_password: Option<PreSharedKey>,
) -> Pin<Box<dyn Future<Output = Result<CitadelClientServerConnection<R>, NetworkError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn connect<'life0, 'async_trait>(
&'life0 self,
auth: AuthenticationRequest,
connect_mode: ConnectMode,
udp_mode: UdpMode,
keep_alive_timeout: Option<Duration>,
session_security_settings: SessionSecuritySettings,
server_password: Option<PreSharedKey>,
) -> Pin<Box<dyn Future<Output = Result<CitadelClientServerConnection<R>, NetworkError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Source§fn connect_with_defaults<'life0, 'async_trait>(
&'life0 self,
auth: AuthenticationRequest,
) -> Pin<Box<dyn Future<Output = Result<CitadelClientServerConnection<R>, NetworkError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn connect_with_defaults<'life0, 'async_trait>(
&'life0 self,
auth: AuthenticationRequest,
) -> Pin<Box<dyn Future<Output = Result<CitadelClientServerConnection<R>, NetworkError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Self::connect Read moreSource§fn find_target<'life0, 'async_trait, T, P>(
&'life0 self,
local_user: T,
peer: P,
) -> Pin<Box<dyn Future<Output = Result<SymmetricIdentifierHandleRef<'_, R>, NetworkError>> + Send + 'async_trait>>where
T: 'async_trait + Into<UserIdentifier> + Send,
P: 'async_trait + Into<UserIdentifier> + Send,
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn find_target<'life0, 'async_trait, T, P>(
&'life0 self,
local_user: T,
peer: P,
) -> Pin<Box<dyn Future<Output = Result<SymmetricIdentifierHandleRef<'_, R>, NetworkError>> + Send + 'async_trait>>where
T: 'async_trait + Into<UserIdentifier> + Send,
P: 'async_trait + Into<UserIdentifier> + Send,
Self: Sync + 'async_trait,
'life0: 'async_trait,
Source§fn propose_target<'life0, 'async_trait, T, P>(
&'life0 self,
local_user: T,
peer: P,
) -> Pin<Box<dyn Future<Output = Result<SymmetricIdentifierHandleRef<'_, R>, NetworkError>> + Send + 'async_trait>>where
T: 'async_trait + Into<UserIdentifier> + Send,
P: 'async_trait + Into<UserIdentifier> + Send,
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn propose_target<'life0, 'async_trait, T, P>(
&'life0 self,
local_user: T,
peer: P,
) -> Pin<Box<dyn Future<Output = Result<SymmetricIdentifierHandleRef<'_, R>, NetworkError>> + Send + 'async_trait>>where
T: 'async_trait + Into<UserIdentifier> + Send,
P: 'async_trait + Into<UserIdentifier> + Send,
Self: Sync + 'async_trait,
'life0: 'async_trait,
Source§fn get_local_group_peers<'life0, 'async_trait, T>(
&'life0 self,
local_user: T,
limit: Option<usize>,
) -> Pin<Box<dyn Future<Output = Result<Vec<LocalGroupPeerFullInfo>, NetworkError>> + Send + 'async_trait>>where
T: 'async_trait + Into<UserIdentifier> + Send,
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn get_local_group_peers<'life0, 'async_trait, T>(
&'life0 self,
local_user: T,
limit: Option<usize>,
) -> Pin<Box<dyn Future<Output = Result<Vec<LocalGroupPeerFullInfo>, NetworkError>> + Send + 'async_trait>>where
T: 'async_trait + Into<UserIdentifier> + Send,
Self: Sync + 'async_trait,
'life0: 'async_trait,
Self::get_local_group_mutual_peers Read moreSource§fn get_local_group_mutual_peers<'life0, 'async_trait, T>(
&'life0 self,
local_user: T,
) -> Pin<Box<dyn Future<Output = Result<Vec<LocalGroupPeerFullInfo>, NetworkError>> + Send + 'async_trait>>where
T: 'async_trait + Into<UserIdentifier> + Send,
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn get_local_group_mutual_peers<'life0, 'async_trait, T>(
&'life0 self,
local_user: T,
) -> Pin<Box<dyn Future<Output = Result<Vec<LocalGroupPeerFullInfo>, NetworkError>> + Send + 'async_trait>>where
T: 'async_trait + Into<UserIdentifier> + Send,
Self: Sync + 'async_trait,
'life0: 'async_trait,
Source§fn probe_server<'life0, 'async_trait>(
&'life0 self,
cid: u64,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = ServerProbeOutcome> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn probe_server<'life0, 'async_trait>(
&'life0 self,
cid: u64,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = ServerProbeOutcome> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
cid now, rather than on the
keep-alive schedule (15 minutes, 45 to time out): Ok(rtt), Timeout when no answer came
within timeout, or Error when it could not be sent (no such connected session, or a
server below protocol 0.12.1, which cannot answer one). Over a WebSocket the probe also
sends a WebSocket ping.Source§fn abandon_session<'life0, 'async_trait>(
&'life0 self,
cid: u64,
) -> Pin<Box<dyn Future<Output = Result<(), NetworkError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn abandon_session<'life0, 'async_trait>(
&'life0 self,
cid: u64,
) -> Pin<Box<dyn Future<Output = Result<(), NetworkError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
cid here and now, without asking the server: its transport is dropped, the
session is forgotten and its CID freed, so the next login is not refused with “Session for
CID .. already exists”. For a link that died silently (after probe_server timed out):
the server’s copy is replaced by that login’s resume token. Resolves once the session has
dropped; Err when this node holds no session for cid.Source§fn sessions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ActiveSessions, NetworkError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn sessions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ActiveSessions, NetworkError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Source§fn rebind_local(&self) -> Result<RebindReport, NetworkError>
fn rebind_local(&self) -> Result<RebindReport, NetworkError>
NodeRemote::rebind_local.Source§impl<R: Ratchet> Remote<R> for ClientServerRemote<R>
impl<R: Ratchet> Remote<R> for ClientServerRemote<R>
Source§fn send_with_custom_ticket<'life0, 'async_trait>(
&'life0 self,
ticket: Ticket,
request: NodeRequest,
) -> Pin<Box<dyn Future<Output = Result<(), NetworkError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_with_custom_ticket<'life0, 'async_trait>(
&'life0 self,
ticket: Ticket,
request: NodeRequest,
) -> Pin<Box<dyn Future<Output = Result<(), NetworkError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn send_callback_subscription<'life0, 'async_trait>(
&'life0 self,
request: NodeRequest,
) -> Pin<Box<dyn Future<Output = Result<KernelStreamSubscription<R>, NetworkError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_callback_subscription<'life0, 'async_trait>(
&'life0 self,
request: NodeRequest,
) -> Pin<Box<dyn Future<Output = Result<KernelStreamSubscription<R>, NetworkError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn account_manager(&self) -> &AccountManager<R, R>
fn account_manager(&self) -> &AccountManager<R, R>
Source§fn get_next_ticket(&self) -> Ticket
fn get_next_ticket(&self) -> Ticket
Source§impl<R: Ratchet> TargetLockedRemote<R> for ClientServerRemote<R>
impl<R: Ratchet> TargetLockedRemote<R> for ClientServerRemote<R>
fn user(&self) -> &VirtualTargetType
fn remote(&self) -> &NodeRemote<R>
fn target_username(&self) -> Option<&str>
fn user_mut(&mut self) -> &mut VirtualTargetType
fn session_security_settings(&self) -> Option<&SessionSecuritySettings>
Auto Trait Implementations§
impl<R> !RefUnwindSafe for ClientServerRemote<R>
impl<R> !UnwindSafe for ClientServerRemote<R>
impl<R> Freeze for ClientServerRemote<R>
impl<R> Send for ClientServerRemote<R>
impl<R> Sync for ClientServerRemote<R>
impl<R> Unpin for ClientServerRemote<R>
impl<R> UnsafeUnpin for ClientServerRemote<R>
Blanket Implementations§
Source§impl<T, R> BackendHandler<R> for Twhere
T: TargetLockedRemote<R>,
R: Ratchet,
impl<T, R> BackendHandler<R> for Twhere
T: TargetLockedRemote<R>,
R: Ratchet,
Source§fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, NetworkError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, NetworkError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn remove<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, NetworkError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn remove<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, NetworkError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn set<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
value: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, NetworkError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn set<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
value: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, NetworkError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ContextRequirements for Twhere
T: 'static,
§impl<T> Conv for T
impl<T> Conv for T
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreimpl<'a, T> LocalContextRequirements<'a> for Twhere
T: 'a,
§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T, R> ProtocolRemoteTargetExt<R> for Twhere
T: TargetLockedRemote<R>,
R: Ratchet,
impl<T, R> ProtocolRemoteTargetExt<R> for Twhere
T: TargetLockedRemote<R>,
R: Ratchet,
Source§fn send_file_with_custom_opts<'life0, 'async_trait, T>(
&'life0 self,
source: T,
chunk_size: usize,
transfer_type: TransferType,
) -> Pin<Box<dyn Future<Output = Result<(), NetworkError>> + Send + 'async_trait>>where
T: 'async_trait + ObjectSource,
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn send_file_with_custom_opts<'life0, 'async_trait, T>(
&'life0 self,
source: T,
chunk_size: usize,
transfer_type: TransferType,
) -> Pin<Box<dyn Future<Output = Result<(), NetworkError>> + Send + 'async_trait>>where
T: 'async_trait + ObjectSource,
Self: Sync + 'async_trait,
'life0: 'async_trait,
Source§fn send_file<'life0, 'async_trait, T>(
&'life0 self,
source: T,
) -> Pin<Box<dyn Future<Output = Result<(), NetworkError>> + Send + 'async_trait>>where
T: 'async_trait + ObjectSource,
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn send_file<'life0, 'async_trait, T>(
&'life0 self,
source: T,
) -> Pin<Box<dyn Future<Output = Result<(), NetworkError>> + Send + 'async_trait>>where
T: 'async_trait + ObjectSource,
Self: Sync + 'async_trait,
'life0: 'async_trait,
Source§fn remote_encrypted_virtual_filesystem_push_custom_chunking<'life0, 'async_trait, T, P>(
&'life0 self,
source: T,
virtual_directory: P,
chunk_size: usize,
security_level: SecurityLevel,
) -> Pin<Box<dyn Future<Output = Result<(), NetworkError>> + Send + 'async_trait>>where
T: 'async_trait + ObjectSource,
P: 'async_trait + Into<PathBuf> + Send,
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn remote_encrypted_virtual_filesystem_push_custom_chunking<'life0, 'async_trait, T, P>(
&'life0 self,
source: T,
virtual_directory: P,
chunk_size: usize,
security_level: SecurityLevel,
) -> Pin<Box<dyn Future<Output = Result<(), NetworkError>> + Send + 'async_trait>>where
T: 'async_trait + ObjectSource,
P: 'async_trait + Into<PathBuf> + Send,
Self: Sync + 'async_trait,
'life0: 'async_trait,
Source§fn remote_encrypted_virtual_filesystem_push<'life0, 'async_trait, T, P>(
&'life0 self,
source: T,
virtual_directory: P,
security_level: SecurityLevel,
) -> Pin<Box<dyn Future<Output = Result<(), NetworkError>> + Send + 'async_trait>>where
T: 'async_trait + ObjectSource,
P: 'async_trait + Into<PathBuf> + Send,
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn remote_encrypted_virtual_filesystem_push<'life0, 'async_trait, T, P>(
&'life0 self,
source: T,
virtual_directory: P,
security_level: SecurityLevel,
) -> Pin<Box<dyn Future<Output = Result<(), NetworkError>> + Send + 'async_trait>>where
T: 'async_trait + ObjectSource,
P: 'async_trait + Into<PathBuf> + Send,
Self: Sync + 'async_trait,
'life0: 'async_trait,
Source§fn remote_encrypted_virtual_filesystem_pull<'life0, 'async_trait, P>(
&'life0 self,
virtual_directory: P,
transfer_security_level: SecurityLevel,
delete_on_pull: bool,
) -> Pin<Box<dyn Future<Output = Result<PathBuf, NetworkError>> + Send + 'async_trait>>
fn remote_encrypted_virtual_filesystem_pull<'life0, 'async_trait, P>( &'life0 self, virtual_directory: P, transfer_security_level: SecurityLevel, delete_on_pull: bool, ) -> Pin<Box<dyn Future<Output = Result<PathBuf, NetworkError>> + Send + 'async_trait>>
delete_on_pull is true, then, the virtual file
will be taken from the RE-VFSSource§fn remote_encrypted_virtual_filesystem_delete<'life0, 'async_trait, P>(
&'life0 self,
virtual_directory: P,
) -> Pin<Box<dyn Future<Output = Result<(), NetworkError>> + Send + 'async_trait>>
fn remote_encrypted_virtual_filesystem_delete<'life0, 'async_trait, P>( &'life0 self, virtual_directory: P, ) -> Pin<Box<dyn Future<Output = Result<(), NetworkError>> + Send + 'async_trait>>
Self::remote_encrypted_virtual_filesystem_pull with the delete
parameter set to trueSource§fn connect_to_peer_custom<'life0, 'async_trait>(
&'life0 self,
session_security_settings: SessionSecuritySettings,
udp_mode: UdpMode,
peer_session_password: Option<PreSharedKey>,
) -> Pin<Box<dyn Future<Output = Result<PeerConnectSuccess<R>, NetworkError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn connect_to_peer_custom<'life0, 'async_trait>(
&'life0 self,
session_security_settings: SessionSecuritySettings,
udp_mode: UdpMode,
peer_session_password: Option<PreSharedKey>,
) -> Pin<Box<dyn Future<Output = Result<PeerConnectSuccess<R>, NetworkError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Source§fn set_turn_config<'life0, 'async_trait>(
&'life0 self,
config: Option<TurnRelayConfig>,
) -> Pin<Box<dyn Future<Output = Result<(), NetworkError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn set_turn_config<'life0, 'async_trait>(
&'life0 self,
config: Option<TurnRelayConfig>,
) -> Pin<Box<dyn Future<Output = Result<(), NetworkError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Some) or withdraws (None) the TURN relay configuration for the next P2P
attempt with this peer. Both peers must supply one for the relay to be used (the
accepting peer before it accepts); the attempt consumes it. When direct P2P is impossible
or fails, the peers then connect through the relay, and
PeerChannel::p2p_path reports
P2pPath::Turn.Source§fn connect_to_peer_with_turn<'life0, 'async_trait>(
&'life0 self,
session_security_settings: SessionSecuritySettings,
udp_mode: UdpMode,
peer_session_password: Option<PreSharedKey>,
turn: TurnRelayConfig,
) -> Pin<Box<dyn Future<Output = Result<PeerConnectSuccess<R>, NetworkError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn connect_to_peer_with_turn<'life0, 'async_trait>(
&'life0 self,
session_security_settings: SessionSecuritySettings,
udp_mode: UdpMode,
peer_session_password: Option<PreSharedKey>,
turn: TurnRelayConfig,
) -> Pin<Box<dyn Future<Output = Result<PeerConnectSuccess<R>, NetworkError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Self::connect_to_peer_custom with a TURN relay configuration for this attempt.Source§fn connect_to_peer<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<PeerConnectSuccess<R>, NetworkError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn connect_to_peer<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<PeerConnectSuccess<R>, NetworkError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Source§fn register_to_peer<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<PeerRegisterStatus, NetworkError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn register_to_peer<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<PeerRegisterStatus, NetworkError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Source§fn deregister<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), NetworkError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn deregister<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), NetworkError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn disconnect<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), NetworkError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn create_group<'life0, 'async_trait>(
&'life0 self,
initial_users_to_invite: Option<Vec<UserIdentifier>>,
) -> Pin<Box<dyn Future<Output = Result<GroupChannel, NetworkError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Source§fn create_group_with_options<'life0, 'async_trait>(
&'life0 self,
initial_users_to_invite: Option<Vec<UserIdentifier>>,
options: MessageGroupOptions,
) -> Pin<Box<dyn Future<Output = Result<GroupChannel, NetworkError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn create_group_with_options<'life0, 'async_trait>(
&'life0 self,
initial_users_to_invite: Option<Vec<UserIdentifier>>,
options: MessageGroupOptions,
) -> Pin<Box<dyn Future<Output = Result<GroupChannel, NetworkError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
MessageGroupOptions — e.g. a zero-trust
GroupHierarchyMode::CommandHierarchy where a
superior can read its subordinates’ messages. options.hierarchy carries the initial rank
assignment (member cid → command path); it is consumed owner-locally and never reaches the relay.Source§fn list_owned_groups<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<MessageGroupKey>, NetworkError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn list_owned_groups<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<MessageGroupKey>, NetworkError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Source§fn list_sessions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ActiveSessions, NetworkError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn list_sessions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ActiveSessions, NetworkError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Source§fn rekey<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<u32>, NetworkError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn rekey<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<u32>, NetworkError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
impl<T> SyncContextRequirements for Twhere
T: 'static,
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.