pub struct NativeOnionCircuitHandle { /* private fields */ }Expand description
Native handle for TCP streams, HTTPS requests, and Kleisli pipelines over onion loops.
Implementations§
Source§impl NativeOnionCircuitHandle
impl NativeOnionCircuitHandle
Sourcepub fn register_invoke(
&self,
shape: OnionInvokeShape,
backend: OnionBackendName,
policy: OnionInvokePolicy,
backend_impl: impl OnionInvokeBackend + 'static,
) -> Result<()>
pub fn register_invoke( &self, shape: OnionInvokeShape, backend: OnionBackendName, policy: OnionInvokePolicy, backend_impl: impl OnionInvokeBackend + 'static, ) -> Result<()>
Register an intermediate invoke backend ⟦(shape, backend)⟧ on this node’s Σ-algebra
(#834 D2). If the node’s role already advertises (shape, backend) in its
crate::onion::OnionInvokeOffer, that signed quota policy takes precedence over policy.
Sourcepub async fn invoke_pipeline(
&self,
processor: &Processor,
pipeline: &OnionInvokePipeline,
input: &[u8],
) -> Result<Vec<u8>>
pub async fn invoke_pipeline( &self, processor: &Processor, pipeline: &OnionInvokePipeline, input: &[u8], ) -> Result<Vec<u8>>
Select a multi-stage route for pipeline from processor’s directory and evaluate it at
pipeline.loop_class() (#834 D4, L3).
Sourcepub async fn invoke_pipeline_over_route(
&self,
route: &OnionPipelineRoute,
pipeline: &OnionInvokePipeline,
input: &[u8],
) -> Result<Vec<u8>>
pub async fn invoke_pipeline_over_route( &self, route: &OnionPipelineRoute, pipeline: &OnionInvokePipeline, input: &[u8], ) -> Result<Vec<u8>>
Evaluate pipeline over an already selected route at pipeline.loop_class() (#834 L3).
Sourcepub async fn invoke_pipeline_over_route_with_options(
&self,
route: &OnionPipelineRoute,
pipeline: &OnionInvokePipeline,
class: OnionLoopClass,
input: &[u8],
timeout: Option<Duration>,
) -> Result<Vec<u8>>
pub async fn invoke_pipeline_over_route_with_options( &self, route: &OnionPipelineRoute, pipeline: &OnionInvokePipeline, class: OnionLoopClass, input: &[u8], timeout: Option<Duration>, ) -> Result<Vec<u8>>
Evaluate pipeline over route at explicit loop class and optional caller timeout
(clamped to the loop’s expiry x).
Sourcepub async fn open_tcp_target(
&self,
processor: &Processor,
target: OnionProxyTarget,
) -> Result<NativeOnionOpenStream>
pub async fn open_tcp_target( &self, processor: &Processor, target: OnionProxyTarget, ) -> Result<NativeOnionOpenStream>
Select a tcp route to target from processor’s directory and open a session over it
at OnionLoopClass::DEFAULT.
Sourcepub async fn open_tcp_target_with_class(
&self,
processor: &Processor,
target: OnionProxyTarget,
class: OnionLoopClass,
) -> Result<NativeOnionOpenStream>
pub async fn open_tcp_target_with_class( &self, processor: &Processor, target: OnionProxyTarget, class: OnionLoopClass, ) -> Result<NativeOnionOpenStream>
Select a tcp route to target from processor’s directory and open a session of loop
class class (b) over it.
Sourcepub async fn open_tcp_stream(
&self,
route: OnionRoute,
target: OnionProxyTarget,
) -> Result<NativeOnionOpenStream>
pub async fn open_tcp_stream( &self, route: OnionRoute, target: OnionProxyTarget, ) -> Result<NativeOnionOpenStream>
Open a tcp session over route at OnionLoopClass::DEFAULT and wait until the exit
has connected target.
Sourcepub async fn open_tcp_stream_with_class(
&self,
route: OnionRoute,
target: OnionProxyTarget,
class: OnionLoopClass,
) -> Result<NativeOnionOpenStream>
pub async fn open_tcp_stream_with_class( &self, route: OnionRoute, target: OnionProxyTarget, class: OnionLoopClass, ) -> Result<NativeOnionOpenStream>
Open a tcp session of loop class class (b) over route and wait until the exit has
connected target.
Sourcepub async fn open_udp_target(
&self,
processor: &Processor,
mode: OnionUdpBindMode,
) -> Result<NativeOnionUdpSession>
pub async fn open_udp_target( &self, processor: &Processor, mode: OnionUdpBindMode, ) -> Result<NativeOnionUdpSession>
Select a udp route for mode from processor’s directory and open an unconnected OS UDP
datagram session at OnionLoopClass::DEFAULT, awaiting the exit’s bound endpoint.
Sourcepub async fn open_udp_target_with_class(
&self,
processor: &Processor,
mode: OnionUdpBindMode,
class: OnionLoopClass,
) -> Result<NativeOnionUdpSession>
pub async fn open_udp_target_with_class( &self, processor: &Processor, mode: OnionUdpBindMode, class: OnionLoopClass, ) -> Result<NativeOnionUdpSession>
Select a udp route for mode from processor’s directory and open an unconnected OS UDP
datagram session of loop class class (b), awaiting the exit’s bound endpoint.
Sourcepub async fn open_udp_session(
&self,
route: OnionRoute,
mode: OnionUdpBindMode,
) -> Result<NativeOnionUdpSession>
pub async fn open_udp_session( &self, route: OnionRoute, mode: OnionUdpBindMode, ) -> Result<NativeOnionUdpSession>
Open a udp session over route at OnionLoopClass::DEFAULT and await the exit’s bound
socket endpoint.
Sourcepub async fn open_udp_session_with_class(
&self,
route: OnionRoute,
mode: OnionUdpBindMode,
class: OnionLoopClass,
) -> Result<NativeOnionUdpSession>
pub async fn open_udp_session_with_class( &self, route: OnionRoute, mode: OnionUdpBindMode, class: OnionLoopClass, ) -> Result<NativeOnionUdpSession>
Open a udp session of loop class class (b) over route and await the exit’s bound
socket endpoint.
Sourcepub async fn request_https(
&self,
route: &OnionProxyRoute,
call: OnionHttpsCall,
) -> Result<OnionHttpsResponse>
pub async fn request_https( &self, route: &OnionProxyRoute, call: OnionHttpsCall, ) -> Result<OnionHttpsResponse>
Send call to route.target over route and wait for the exit’s response.
Sourcepub async fn request_https_with_class(
&self,
route: &OnionProxyRoute,
call: OnionHttpsCall,
class: OnionLoopClass,
) -> Result<OnionHttpsResponse>
pub async fn request_https_with_class( &self, route: &OnionProxyRoute, call: OnionHttpsCall, class: OnionLoopClass, ) -> Result<OnionHttpsResponse>
Send call to route.target over route in a session of loop class class (b) and
wait for the exit’s response.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for NativeOnionCircuitHandle
impl !UnwindSafe for NativeOnionCircuitHandle
impl Forget for NativeOnionCircuitHandle
impl Freeze for NativeOnionCircuitHandle
impl Move for NativeOnionCircuitHandle
impl Send for NativeOnionCircuitHandle
impl Sync for NativeOnionCircuitHandle
impl Unpin for NativeOnionCircuitHandle
impl UnsafeUnpin for NativeOnionCircuitHandle
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> 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 moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T> MaybeSend for T
impl<T> MaybeSendSync for T
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.