mirror of
https://github.com/n0-computer/iroh.git
synced 2026-11-30 00:01:16 +00:00
deploy: 89e3f4ed75ff50c062344411967eb73d1dadeed0
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Middlewares intercept the connection establishment process of an `Endpoint`."><title>Middleware in iroh::endpoint - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="iroh" data-themes="" data-resource-suffix="" data-rustdoc-version="1.92.0-nightly (b6f0945e4 2025-10-08)" data-channel="nightly" data-search-js="search-8d3311b9.js" data-stringdex-js="stringdex-828709d0.js" data-settings-js="settings-c38705f0.js" ><script src="../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-ce535bd0.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Middleware</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh/index.html">iroh</a><span class="version">0.95.1</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Middleware</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#notes-to-implementors" title="Notes to implementors">Notes to implementors</a></li></ul><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.after_handshake" title="after_handshake">after_handshake</a></li><li><a href="#method.before_connect" title="before_connect">before_connect</a></li></ul><h3><a href="#dyn-compatibility">Dyn Compatibility</a></h3><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In iroh::<wbr>endpoint</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">iroh</a>::<wbr><a href="index.html">endpoint</a></div><h1>Trait <span class="trait">Middleware</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/iroh/endpoint/middleware.rs.html#69-99">Source</a> </span></div><pre class="rust item-decl"><code>pub trait Middleware:
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Middlewares intercept the connection establishment process of an `Endpoint`."><title>Middleware in iroh::endpoint - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="iroh" data-themes="" data-resource-suffix="" data-rustdoc-version="1.92.0-nightly (b6f0945e4 2025-10-08)" data-channel="nightly" data-search-js="search-8d3311b9.js" data-stringdex-js="stringdex-828709d0.js" data-settings-js="settings-c38705f0.js" ><script src="../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-ce535bd0.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Middleware</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh/index.html">iroh</a><span class="version">0.95.1</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Middleware</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#notes-to-implementers" title="Notes to implementers">Notes to implementers</a></li></ul><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.after_handshake" title="after_handshake">after_handshake</a></li><li><a href="#method.before_connect" title="before_connect">before_connect</a></li></ul><h3><a href="#dyn-compatibility">Dyn Compatibility</a></h3><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In iroh::<wbr>endpoint</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">iroh</a>::<wbr><a href="index.html">endpoint</a></div><h1>Trait <span class="trait">Middleware</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/iroh/endpoint/middleware.rs.html#69-99">Source</a> </span></div><pre class="rust item-decl"><code>pub trait Middleware:
|
||||
<a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>
|
||||
+ <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>
|
||||
+ <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> {
|
||||
@@ -18,7 +18,7 @@
|
||||
the endpoint builder. If a middleware returns <code>Accept</code>, processing continues with the next
|
||||
middleware. If a middleware returns <code>Reject</code>, processing is aborted and further middlewares
|
||||
are not invoked for this hook.</p>
|
||||
<h3 id="notes-to-implementors"><a class="doc-anchor" href="#notes-to-implementors">§</a>Notes to implementors</h3>
|
||||
<h3 id="notes-to-implementers"><a class="doc-anchor" href="#notes-to-implementers">§</a>Notes to implementers</h3>
|
||||
<p>As middlewares are stored on the endpoint, you must make sure to never store an <a href="struct.Endpoint.html" title="struct iroh::endpoint::Endpoint"><code>Endpoint</code></a>
|
||||
on the middleware struct itself, as this would create reference counting loop and cause the
|
||||
endpoint to never be dropped, leaking memory.</p>
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
@@ -1082,8 +1082,8 @@
|
||||
<a href=#1082 id=1082 data-nosnippet>1082</a> <span class="kw-2">&</span><span class="self">self</span>.data.info.alpn
|
||||
<a href=#1083 id=1083 data-nosnippet>1083</a> }
|
||||
<a href=#1084 id=1084 data-nosnippet>1084</a>
|
||||
<a href=#1085 id=1085 data-nosnippet>1085</a> <span class="kw">pub fn </span>remote_id(<span class="kw-2">&</span><span class="self">self</span>) -> <span class="kw-2">&</span>EndpointId {
|
||||
<a href=#1086 id=1086 data-nosnippet>1086</a> <span class="kw-2">&</span><span class="self">self</span>.data.info.endpoint_id
|
||||
<a href=#1085 id=1085 data-nosnippet>1085</a> <span class="kw">pub fn </span>remote_id(<span class="kw-2">&</span><span class="self">self</span>) -> EndpointId {
|
||||
<a href=#1086 id=1086 data-nosnippet>1086</a> <span class="self">self</span>.data.info.endpoint_id
|
||||
<a href=#1087 id=1087 data-nosnippet>1087</a> }
|
||||
<a href=#1088 id=1088 data-nosnippet>1088</a>
|
||||
<a href=#1089 id=1089 data-nosnippet>1089</a> <span class="kw">pub fn </span>is_alive(<span class="kw-2">&</span><span class="self">self</span>) -> bool {
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
<a href=#58 id=58 data-nosnippet>58</a>/// middleware. If a middleware returns `Reject`, processing is aborted and further middlewares
|
||||
<a href=#59 id=59 data-nosnippet>59</a>/// are not invoked for this hook.
|
||||
<a href=#60 id=60 data-nosnippet>60</a>///
|
||||
<a href=#61 id=61 data-nosnippet>61</a>/// ## Notes to implementors
|
||||
<a href=#61 id=61 data-nosnippet>61</a>/// ## Notes to implementers
|
||||
<a href=#62 id=62 data-nosnippet>62</a>///
|
||||
<a href=#63 id=63 data-nosnippet>63</a>/// As middlewares are stored on the endpoint, you must make sure to never store an [`Endpoint`]
|
||||
<a href=#64 id=64 data-nosnippet>64</a>/// on the middleware struct itself, as this would create reference counting loop and cause the
|
||||
|
||||
Reference in New Issue
Block a user