mirror of
https://github.com/n0-computer/iroh.git
synced 2026-11-30 16:03:05 +00:00
deploy: c976aca109804e9006652de253de65ebf34ec8e2
This commit is contained in:
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,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="Handle a single connection."><title>handle_connection in iroh::blobs::provider - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-b21aa549bf6d91ff.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.80.0-nightly (c987ad527 2024-05-01)" data-channel="nightly" data-search-js="search-bf21c90c8c1d92b1.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../../static.files/storage-e32f0c247825364d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-09095024cf37855e.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../iroh/index.html">iroh</a><span class="version">0.22.0</span></h2></div><div class="sidebar-elems"><h2><a href="index.html">In iroh::blobs::provider</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../../iroh/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Type ‘S’ or ‘/’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings">Settings</a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Function <a href="../../index.html">iroh</a>::<wbr><a href="../index.html">blobs</a>::<wbr><a href="index.html">provider</a>::<wbr><a class="fn" href="#">handle_connection</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../../src/iroh_blobs/provider.rs.html#308-313">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub async fn handle_connection<D>(
|
||||
<!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="Handle a single connection."><title>handle_connection in iroh::blobs::provider - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-b21aa549bf6d91ff.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.80.0-nightly (c987ad527 2024-05-01)" data-channel="nightly" data-search-js="search-bf21c90c8c1d92b1.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../../static.files/storage-e32f0c247825364d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-09095024cf37855e.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../iroh/index.html">iroh</a><span class="version">0.22.0</span></h2></div><div class="sidebar-elems"><h2><a href="index.html">In iroh::blobs::provider</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../../iroh/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Type ‘S’ or ‘/’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings">Settings</a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Function <a href="../../index.html">iroh</a>::<wbr><a href="../index.html">blobs</a>::<wbr><a href="index.html">provider</a>::<wbr><a class="fn" href="#">handle_connection</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../../src/iroh_blobs/provider.rs.html#354-359">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub async fn handle_connection<D>(
|
||||
connection: <a class="struct" href="../../net/endpoint/struct.Connection.html" title="struct iroh::net::endpoint::Connection">Connection</a>,
|
||||
db: D,
|
||||
events: <a class="struct" href="struct.EventSender.html" title="struct iroh::blobs::provider::EventSender">EventSender</a>,
|
||||
|
||||
@@ -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="Handle a single standard get request."><title>handle_get in iroh::blobs::provider - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-b21aa549bf6d91ff.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.80.0-nightly (c987ad527 2024-05-01)" data-channel="nightly" data-search-js="search-bf21c90c8c1d92b1.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../../static.files/storage-e32f0c247825364d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-09095024cf37855e.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../iroh/index.html">iroh</a><span class="version">0.22.0</span></h2></div><div class="sidebar-elems"><h2><a href="index.html">In iroh::blobs::provider</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../../iroh/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Type ‘S’ or ‘/’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings">Settings</a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Function <a href="../../index.html">iroh</a>::<wbr><a href="../index.html">blobs</a>::<wbr><a href="index.html">provider</a>::<wbr><a class="fn" href="#">handle_get</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../../src/iroh_blobs/provider.rs.html#363-367">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub async fn handle_get<D>(
|
||||
<!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="Handle a single standard get request."><title>handle_get in iroh::blobs::provider - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-b21aa549bf6d91ff.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.80.0-nightly (c987ad527 2024-05-01)" data-channel="nightly" data-search-js="search-bf21c90c8c1d92b1.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../../static.files/storage-e32f0c247825364d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-09095024cf37855e.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../iroh/index.html">iroh</a><span class="version">0.22.0</span></h2></div><div class="sidebar-elems"><h2><a href="index.html">In iroh::blobs::provider</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../../iroh/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Type ‘S’ or ‘/’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings">Settings</a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Function <a href="../../index.html">iroh</a>::<wbr><a href="../index.html">blobs</a>::<wbr><a href="index.html">provider</a>::<wbr><a class="fn" href="#">handle_get</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../../src/iroh_blobs/provider.rs.html#409-413">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub async fn handle_get<D>(
|
||||
db: D,
|
||||
request: <a class="struct" href="../protocol/struct.GetRequest.html" title="struct iroh::blobs::protocol::GetRequest">GetRequest</a>,
|
||||
writer: <a class="struct" href="struct.ResponseWriter.html" title="struct iroh::blobs::provider::ResponseWriter">ResponseWriter</a>
|
||||
|
||||
@@ -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="Read the request from the getter."><title>read_request in iroh::blobs::provider - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-b21aa549bf6d91ff.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.80.0-nightly (c987ad527 2024-05-01)" data-channel="nightly" data-search-js="search-bf21c90c8c1d92b1.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../../static.files/storage-e32f0c247825364d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-09095024cf37855e.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../iroh/index.html">iroh</a><span class="version">0.22.0</span></h2></div><div class="sidebar-elems"><h2><a href="index.html">In iroh::blobs::provider</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../../iroh/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Type ‘S’ or ‘/’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings">Settings</a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Function <a href="../../index.html">iroh</a>::<wbr><a href="../index.html">blobs</a>::<wbr><a href="index.html">provider</a>::<wbr><a class="fn" href="#">read_request</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../../src/iroh_blobs/provider.rs.html#163">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub async fn read_request(reader: <a class="struct" href="../../net/endpoint/struct.RecvStream.html" title="struct iroh::net::endpoint::RecvStream">RecvStream</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="../protocol/enum.Request.html" title="enum iroh::blobs::protocol::Request">Request</a>, <a class="struct" href="https://docs.rs/anyhow/1.0.85/anyhow/struct.Error.html" title="struct anyhow::Error">Error</a>></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Read the request from the getter.</p>
|
||||
<!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="Read the request from the getter."><title>read_request in iroh::blobs::provider - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-b21aa549bf6d91ff.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.80.0-nightly (c987ad527 2024-05-01)" data-channel="nightly" data-search-js="search-bf21c90c8c1d92b1.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../../static.files/storage-e32f0c247825364d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-09095024cf37855e.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../iroh/index.html">iroh</a><span class="version">0.22.0</span></h2></div><div class="sidebar-elems"><h2><a href="index.html">In iroh::blobs::provider</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../../iroh/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Type ‘S’ or ‘/’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings">Settings</a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Function <a href="../../index.html">iroh</a>::<wbr><a href="../index.html">blobs</a>::<wbr><a href="index.html">provider</a>::<wbr><a class="fn" href="#">read_request</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../../src/iroh_blobs/provider.rs.html#165">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub async fn read_request(reader: <a class="struct" href="../../net/endpoint/struct.RecvStream.html" title="struct iroh::net::endpoint::RecvStream">RecvStream</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="../protocol/enum.Request.html" title="enum iroh::blobs::protocol::Request">Request</a>, <a class="struct" href="https://docs.rs/anyhow/1.0.85/anyhow/struct.Error.html" title="struct anyhow::Error">Error</a>></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Read the request from the getter.</p>
|
||||
<p>Will fail if there is an error while reading, if the reader
|
||||
contains more data than the Request, or if no valid request is sent.</p>
|
||||
<p>When successful, the buffer is empty after this function call.</p>
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
<!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="Send a blob to the client."><title>send_blob in iroh::blobs::provider - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-b21aa549bf6d91ff.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.80.0-nightly (c987ad527 2024-05-01)" data-channel="nightly" data-search-js="search-bf21c90c8c1d92b1.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../../static.files/storage-e32f0c247825364d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-09095024cf37855e.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../iroh/index.html">iroh</a><span class="version">0.22.0</span></h2></div><div class="sidebar-elems"><h2><a href="index.html">In iroh::blobs::provider</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../../iroh/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Type ‘S’ or ‘/’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings">Settings</a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Function <a href="../../index.html">iroh</a>::<wbr><a href="../index.html">blobs</a>::<wbr><a href="index.html">provider</a>::<wbr><a class="fn" href="#">send_blob</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../../src/iroh_blobs/provider.rs.html#507-512">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub async fn send_blob<D, W>(
|
||||
<!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="Send a blob to the client."><title>send_blob in iroh::blobs::provider - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-b21aa549bf6d91ff.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.80.0-nightly (c987ad527 2024-05-01)" data-channel="nightly" data-search-js="search-bf21c90c8c1d92b1.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../../static.files/storage-e32f0c247825364d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-09095024cf37855e.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../iroh/index.html">iroh</a><span class="version">0.22.0</span></h2></div><div class="sidebar-elems"><h2><a href="index.html">In iroh::blobs::provider</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../../iroh/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Type ‘S’ or ‘/’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings">Settings</a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Function <a href="../../index.html">iroh</a>::<wbr><a href="../index.html">blobs</a>::<wbr><a href="index.html">provider</a>::<wbr><a class="fn" href="#">send_blob</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../../src/iroh_blobs/provider.rs.html#553-560">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub async fn send_blob<D, W>(
|
||||
db: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&D</a>,
|
||||
hash: <a class="struct" href="../struct.Hash.html" title="struct iroh::blobs::Hash">Hash</a>,
|
||||
ranges: &<a class="struct" href="../protocol/struct.RangeSpec.html" title="struct iroh::blobs::protocol::RangeSpec">RangeSpec</a>,
|
||||
writer: W
|
||||
writer: W,
|
||||
events: <a class="struct" href="struct.EventSender.html" title="struct iroh::blobs::provider::EventSender">EventSender</a>,
|
||||
mk_progress: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>) -> <a class="enum" href="enum.Event.html" title="enum iroh::blobs::provider::Event">Event</a>
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><(<a class="enum" href="enum.SentStatus.html" title="enum iroh::blobs::provider::SentStatus">SentStatus</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>, SliceReaderStats), <a class="struct" href="https://docs.rs/anyhow/1.0.85/anyhow/struct.Error.html" title="struct anyhow::Error">Error</a>><div class="where">where
|
||||
D: <a class="trait" href="../store/trait.Map.html" title="trait iroh::blobs::store::Map">Map</a>,
|
||||
W: AsyncStreamWriter,</div></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Send a blob to the client.</p>
|
||||
|
||||
@@ -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="Transfers the collection & blob data."><title>transfer_collection in iroh::blobs::provider - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-b21aa549bf6d91ff.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.80.0-nightly (c987ad527 2024-05-01)" data-channel="nightly" data-search-js="search-bf21c90c8c1d92b1.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../../static.files/storage-e32f0c247825364d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-09095024cf37855e.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../iroh/index.html">iroh</a><span class="version">0.22.0</span></h2></div><div class="sidebar-elems"><h2><a href="index.html">In iroh::blobs::provider</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../../iroh/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Type ‘S’ or ‘/’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings">Settings</a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Function <a href="../../index.html">iroh</a>::<wbr><a href="../index.html">blobs</a>::<wbr><a href="index.html">provider</a>::<wbr><a class="fn" href="#">transfer_collection</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../../src/iroh_blobs/provider.rs.html#183-193">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub async fn transfer_collection<D>(
|
||||
<!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="Transfers the collection & blob data."><title>transfer_collection in iroh::blobs::provider - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-b21aa549bf6d91ff.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.80.0-nightly (c987ad527 2024-05-01)" data-channel="nightly" data-search-js="search-bf21c90c8c1d92b1.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../../static.files/storage-e32f0c247825364d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-09095024cf37855e.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../iroh/index.html">iroh</a><span class="version">0.22.0</span></h2></div><div class="sidebar-elems"><h2><a href="index.html">In iroh::blobs::provider</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../../iroh/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Type ‘S’ or ‘/’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings">Settings</a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Function <a href="../../index.html">iroh</a>::<wbr><a href="../index.html">blobs</a>::<wbr><a href="index.html">provider</a>::<wbr><a class="fn" href="#">transfer_collection</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../../src/iroh_blobs/provider.rs.html#185-195">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub async fn transfer_collection<D>(
|
||||
request: <a class="struct" href="../protocol/struct.GetRequest.html" title="struct iroh::blobs::protocol::GetRequest">GetRequest</a>,
|
||||
db: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&D</a>,
|
||||
writer: &mut <a class="struct" href="struct.ResponseWriter.html" title="struct iroh::blobs::provider::ResponseWriter">ResponseWriter</a>,
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
<!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="The server side API"><title>iroh::blobs::provider - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-b21aa549bf6d91ff.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.80.0-nightly (c987ad527 2024-05-01)" data-channel="nightly" data-search-js="search-bf21c90c8c1d92b1.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../../static.files/storage-e32f0c247825364d.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-09095024cf37855e.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../iroh/index.html">iroh</a><span class="version">0.22.0</span></h2></div><h2 class="location"><a href="#">Module provider</a></h2><div class="sidebar-elems"><section><ul class="block"><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#traits">Traits</a></li><li><a href="#functions">Functions</a></li></ul></section><h2><a href="../index.html">In iroh::blobs</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../../iroh/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Type ‘S’ or ‘/’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings">Settings</a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Module <a href="../../index.html">iroh</a>::<wbr><a href="../index.html">blobs</a>::<wbr><a class="mod" href="#">provider</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../../src/iroh_blobs/lib.rs.html#14">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The server side API</p>
|
||||
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.EventSender.html" title="struct iroh::blobs::provider::EventSender">EventSender</a></div></li><li><div class="item-name"><a class="struct" href="struct.ResponseWriter.html" title="struct iroh::blobs::provider::ResponseWriter">ResponseWriter</a></div><div class="desc docblock-short">A helper struct that combines a quinn::SendStream with auxiliary information</div></li><li><div class="item-name"><a class="struct" href="struct.TransferStats.html" title="struct iroh::blobs::provider::TransferStats">TransferStats</a></div><div class="desc docblock-short">The stats for a transfer of a collection or blob.</div></li></ul><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="enum" href="enum.AddProgress.html" title="enum iroh::blobs::provider::AddProgress">AddProgress</a></div><div class="desc docblock-short">Progress updates for the add operation.</div></li><li><div class="item-name"><a class="enum" href="enum.Event.html" title="enum iroh::blobs::provider::Event">Event</a></div><div class="desc docblock-short">Events emitted by the provider informing about the current status.</div></li><li><div class="item-name"><a class="enum" href="enum.SentStatus.html" title="enum iroh::blobs::provider::SentStatus">SentStatus</a></div><div class="desc docblock-short">Status of a send operation</div></li></ul><h2 id="traits" class="section-header">Traits<a href="#traits" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="trait" href="trait.EventSenderPlugin.html" title="trait iroh::blobs::provider::EventSenderPlugin">EventSenderPlugin</a></div><div class="desc docblock-short">Trait for sending events.</div></li></ul><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="fn" href="fn.handle_connection.html" title="fn iroh::blobs::provider::handle_connection">handle_connection</a></div><div class="desc docblock-short">Handle a single connection.</div></li><li><div class="item-name"><a class="fn" href="fn.handle_get.html" title="fn iroh::blobs::provider::handle_get">handle_get</a></div><div class="desc docblock-short">Handle a single standard get request.</div></li><li><div class="item-name"><a class="fn" href="fn.read_request.html" title="fn iroh::blobs::provider::read_request">read_request</a></div><div class="desc docblock-short">Read the request from the getter.</div></li><li><div class="item-name"><a class="fn" href="fn.send_blob.html" title="fn iroh::blobs::provider::send_blob">send_blob</a></div><div class="desc docblock-short">Send a blob to the client.</div></li><li><div class="item-name"><a class="fn" href="fn.transfer_collection.html" title="fn iroh::blobs::provider::transfer_collection">transfer_collection</a></div><div class="desc docblock-short">Transfers the collection & blob data.</div></li></ul></section></div></main></body></html>
|
||||
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.EventSender.html" title="struct iroh::blobs::provider::EventSender">EventSender</a></div></li><li><div class="item-name"><a class="struct" href="struct.ResponseWriter.html" title="struct iroh::blobs::provider::ResponseWriter">ResponseWriter</a></div><div class="desc docblock-short">A helper struct that combines a quinn::SendStream with auxiliary information</div></li><li><div class="item-name"><a class="struct" href="struct.TransferStats.html" title="struct iroh::blobs::provider::TransferStats">TransferStats</a></div><div class="desc docblock-short">The stats for a transfer of a collection or blob.</div></li></ul><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="enum" href="enum.AddProgress.html" title="enum iroh::blobs::provider::AddProgress">AddProgress</a></div><div class="desc docblock-short">Progress updates for the add operation.</div></li><li><div class="item-name"><a class="enum" href="enum.Event.html" title="enum iroh::blobs::provider::Event">Event</a></div><div class="desc docblock-short">Events emitted by the provider informing about the current status.</div></li><li><div class="item-name"><a class="enum" href="enum.SentStatus.html" title="enum iroh::blobs::provider::SentStatus">SentStatus</a></div><div class="desc docblock-short">Status of a send operation</div></li></ul><h2 id="traits" class="section-header">Traits<a href="#traits" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="trait" href="trait.CustomEventSender.html" title="trait iroh::blobs::provider::CustomEventSender">CustomEventSender</a></div><div class="desc docblock-short">Trait for sending events.</div></li></ul><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="fn" href="fn.handle_connection.html" title="fn iroh::blobs::provider::handle_connection">handle_connection</a></div><div class="desc docblock-short">Handle a single connection.</div></li><li><div class="item-name"><a class="fn" href="fn.handle_get.html" title="fn iroh::blobs::provider::handle_get">handle_get</a></div><div class="desc docblock-short">Handle a single standard get request.</div></li><li><div class="item-name"><a class="fn" href="fn.read_request.html" title="fn iroh::blobs::provider::read_request">read_request</a></div><div class="desc docblock-short">Read the request from the getter.</div></li><li><div class="item-name"><a class="fn" href="fn.send_blob.html" title="fn iroh::blobs::provider::send_blob">send_blob</a></div><div class="desc docblock-short">Send a blob to the client.</div></li><li><div class="item-name"><a class="fn" href="fn.transfer_collection.html" title="fn iroh::blobs::provider::transfer_collection">transfer_collection</a></div><div class="desc docblock-short">Transfers the collection & blob data.</div></li></ul></section></div></main></body></html>
|
||||
@@ -1 +1 @@
|
||||
window.SIDEBAR_ITEMS = {"enum":["AddProgress","Event","SentStatus"],"fn":["handle_connection","handle_get","read_request","send_blob","transfer_collection"],"struct":["EventSender","ResponseWriter","TransferStats"],"trait":["EventSenderPlugin"]};
|
||||
window.SIDEBAR_ITEMS = {"enum":["AddProgress","Event","SentStatus"],"fn":["handle_connection","handle_get","read_request","send_blob","transfer_collection"],"struct":["EventSender","ResponseWriter","TransferStats"],"trait":["CustomEventSender"]};
|
||||
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
+3
-3
@@ -1,6 +1,6 @@
|
||||
<!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="Trait for sending events."><title>EventSenderPlugin in iroh::blobs::provider - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-b21aa549bf6d91ff.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.80.0-nightly (c987ad527 2024-05-01)" data-channel="nightly" data-search-js="search-bf21c90c8c1d92b1.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../../static.files/storage-e32f0c247825364d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-09095024cf37855e.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.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]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../iroh/index.html">iroh</a><span class="version">0.22.0</span></h2></div><h2 class="location"><a href="#">EventSenderPlugin</a></h2><div class="sidebar-elems"><section><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.send">send</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><h2><a href="index.html">In iroh::blobs::provider</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../../iroh/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Type ‘S’ or ‘/’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings">Settings</a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Trait <a href="../../index.html">iroh</a>::<wbr><a href="../index.html">blobs</a>::<wbr><a href="index.html">provider</a>::<wbr><a class="trait" href="#">EventSenderPlugin</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../../src/iroh_blobs/provider.rs.html#278">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub trait EventSenderPlugin: <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.Sync.html" title="trait core::marker::Sync">Sync</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'static {
|
||||
<!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="Trait for sending events."><title>CustomEventSender in iroh::blobs::provider - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-b21aa549bf6d91ff.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.80.0-nightly (c987ad527 2024-05-01)" data-channel="nightly" data-search-js="search-bf21c90c8c1d92b1.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../../static.files/storage-e32f0c247825364d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-09095024cf37855e.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.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]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../iroh/index.html">iroh</a><span class="version">0.22.0</span></h2></div><h2 class="location"><a href="#">CustomEventSender</a></h2><div class="sidebar-elems"><section><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.send">send</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><h2><a href="index.html">In iroh::blobs::provider</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../../iroh/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Type ‘S’ or ‘/’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings">Settings</a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Trait <a href="../../index.html">iroh</a>::<wbr><a href="../index.html">blobs</a>::<wbr><a href="index.html">provider</a>::<wbr><a class="trait" href="#">CustomEventSender</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../../src/iroh_blobs/provider.rs.html#316">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub trait CustomEventSender: <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.Sync.html" title="trait core::marker::Sync">Sync</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'static {
|
||||
// Required method
|
||||
fn <a href="#tymethod.send" class="fn">send</a>(&self, event: <a class="enum" href="enum.Event.html" title="enum iroh::blobs::provider::Event">Event</a>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a><Output = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>>>;
|
||||
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Trait for sending events.</p>
|
||||
</div></details><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.send" class="method"><a class="src rightside" href="../../../src/iroh_blobs/provider.rs.html#280">source</a><h4 class="code-header">fn <a href="#tymethod.send" class="fn">send</a>(&self, event: <a class="enum" href="enum.Event.html" title="enum iroh::blobs::provider::Event">Event</a>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a><Output = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>>></h4></section></summary><div class="docblock"><p>Send an event.</p>
|
||||
</div></details></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"></div><script src="../../../trait.impl/iroh_blobs/provider/trait.EventSenderPlugin.js" async></script></section></div></main></body></html>
|
||||
</div></details><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.send" class="method"><a class="src rightside" href="../../../src/iroh_blobs/provider.rs.html#318">source</a><h4 class="code-header">fn <a href="#tymethod.send" class="fn">send</a>(&self, event: <a class="enum" href="enum.Event.html" title="enum iroh::blobs::provider::Event">Event</a>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a><Output = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>>></h4></section></summary><div class="docblock"><p>Send an event.</p>
|
||||
</div></details></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"></div><script src="../../../trait.impl/iroh_blobs/provider/trait.CustomEventSender.js" async></script></section></div></main></body></html>
|
||||
@@ -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="API for blobs management."><title>iroh::client::blobs - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-b21aa549bf6d91ff.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.80.0-nightly (c987ad527 2024-05-01)" data-channel="nightly" data-search-js="search-bf21c90c8c1d92b1.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../../static.files/storage-e32f0c247825364d.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-09095024cf37855e.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../iroh/index.html">iroh</a><span class="version">0.22.0</span></h2></div><h2 class="location"><a href="#">Module blobs</a></h2><div class="sidebar-elems"><section><ul class="block"><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li></ul></section><h2><a href="../index.html">In iroh::client</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../../iroh/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Type ‘S’ or ‘/’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings">Settings</a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Module <a href="../../index.html">iroh</a>::<wbr><a href="../index.html">client</a>::<wbr><a class="mod" href="#">blobs</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../../src/iroh/client/blobs.rs.html#1-1515">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>API for blobs management.</p>
|
||||
<!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="API for blobs management."><title>iroh::client::blobs - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-b21aa549bf6d91ff.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.80.0-nightly (c987ad527 2024-05-01)" data-channel="nightly" data-search-js="search-bf21c90c8c1d92b1.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../../static.files/storage-e32f0c247825364d.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-09095024cf37855e.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../iroh/index.html">iroh</a><span class="version">0.22.0</span></h2></div><h2 class="location"><a href="#">Module blobs</a></h2><div class="sidebar-elems"><section><ul class="block"><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li></ul></section><h2><a href="../index.html">In iroh::client</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../../iroh/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Type ‘S’ or ‘/’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings">Settings</a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Module <a href="../../index.html">iroh</a>::<wbr><a href="../index.html">client</a>::<wbr><a class="mod" href="#">blobs</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../../src/iroh/client/blobs.rs.html#1-1519">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>API for blobs management.</p>
|
||||
<p>The main entry point is the <a href="struct.Client.html" title="struct iroh::client::blobs::Client"><code>Client</code></a>.</p>
|
||||
<p>You obtain a <a href="struct.Client.html" title="struct iroh::client::blobs::Client"><code>Client</code></a> via <a href="../struct.Iroh.html#method.blobs" title="method iroh::client::Iroh::blobs"><code>Iroh::blobs()</code></a>.</p>
|
||||
<h3 id="interacting-with-the-local-blob-store"><a class="doc-anchor" href="#interacting-with-the-local-blob-store">§</a>Interacting with the local blob store</h3><h4 id="importing-data"><a class="doc-anchor" href="#importing-data">§</a>Importing data</h4>
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -7,4 +7,4 @@ to subscribe to a topic. This returns a sink to send updates to the topic
|
||||
and a stream of responses.</p>
|
||||
<p><a href="struct.Client.html#method.subscribe_with_opts" title="method iroh::client::gossip::Client::subscribe_with_opts"><code>Client::subscribe_with_opts</code></a> allows you to specify advanced options
|
||||
such as the buffer size.</p>
|
||||
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.Client.html" title="struct iroh::client::gossip::Client">Client</a></div><div class="desc docblock-short">Iroh gossip client.</div></li><li><div class="item-name"><a class="struct" href="struct.SubscribeOpts.html" title="struct iroh::client::gossip::SubscribeOpts">SubscribeOpts</a></div><div class="desc docblock-short">Options for subscribing to a gossip topic.</div></li><li><div class="item-name"><a class="struct" href="struct.SubscribeRequest.html" title="struct iroh::client::gossip::SubscribeRequest">SubscribeRequest</a></div><div class="desc docblock-short">A request to the node to subscribe to gossip events.</div></li></ul><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="enum" href="enum.SubscribeResponse.html" title="enum iroh::client::gossip::SubscribeResponse">SubscribeResponse</a></div><div class="desc docblock-short">Update from a subscribed gossip topic.</div></li><li><div class="item-name"><a class="enum" href="enum.SubscribeUpdate.html" title="enum iroh::client::gossip::SubscribeUpdate">SubscribeUpdate</a></div><div class="desc docblock-short">Send a gossip message</div></li></ul></section></div></main></body></html>
|
||||
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.Client.html" title="struct iroh::client::gossip::Client">Client</a></div><div class="desc docblock-short">Iroh gossip client.</div></li><li><div class="item-name"><a class="struct" href="struct.SubscribeOpts.html" title="struct iroh::client::gossip::SubscribeOpts">SubscribeOpts</a></div><div class="desc docblock-short">Options for subscribing to a gossip topic.</div></li><li><div class="item-name"><a class="struct" href="struct.SubscribeRequest.html" title="struct iroh::client::gossip::SubscribeRequest">SubscribeRequest</a></div><div class="desc docblock-short">A request to the node to subscribe to gossip events.</div></li></ul><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="enum" href="enum.SubscribeResponse.html" title="enum iroh::client::gossip::SubscribeResponse">SubscribeResponse</a></div><div class="desc docblock-short">Events emitted from a gossip topic with a lagging notification.</div></li><li><div class="item-name"><a class="enum" href="enum.SubscribeUpdate.html" title="enum iroh::client::gossip::SubscribeUpdate">SubscribeUpdate</a></div><div class="desc docblock-short">Send a gossip message</div></li></ul></section></div></main></body></html>
|
||||
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,3 +1,2 @@
|
||||
<!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="Networking for the `iroh-gossip` protocol"><title>iroh::gossip::net - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-b21aa549bf6d91ff.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.80.0-nightly (c987ad527 2024-05-01)" data-channel="nightly" data-search-js="search-bf21c90c8c1d92b1.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../../static.files/storage-e32f0c247825364d.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-09095024cf37855e.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../iroh/index.html">iroh</a><span class="version">0.22.0</span></h2></div><h2 class="location"><a href="#">Module net</a></h2><div class="sidebar-elems"><section><ul class="block"><li><a href="#modules">Modules</a></li><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#constants">Constants</a></li><li><a href="#types">Type Aliases</a></li></ul></section><h2><a href="../index.html">In iroh::gossip</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../../iroh/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Type ‘S’ or ‘/’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings">Settings</a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Module <a href="../../index.html">iroh</a>::<wbr><a href="../index.html">gossip</a>::<wbr><a class="mod" href="#">net</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../../src/iroh_gossip/lib.rs.html#7">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Networking for the <code>iroh-gossip</code> protocol</p>
|
||||
</div></details><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="mod" href="util/index.html" title="mod iroh::gossip::net::util">util</a></div><div class="desc docblock-short">Utilities for iroh-gossip networking</div></li></ul><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.Gossip.html" title="struct iroh::gossip::net::Gossip">Gossip</a></div><div class="desc docblock-short">Publish and subscribe on gossiping topics.</div></li><li><div class="item-name"><a class="struct" href="struct.GossipReceiver.html" title="struct iroh::gossip::net::GossipReceiver">GossipReceiver</a></div><div class="desc docblock-short">Receiver for gossip events on a topic.</div></li><li><div class="item-name"><a class="struct" href="struct.GossipSender.html" title="struct iroh::gossip::net::GossipSender">GossipSender</a></div><div class="desc docblock-short">Sender for a gossip topic.</div></li><li><div class="item-name"><a class="struct" href="struct.GossipTopic.html" title="struct iroh::gossip::net::GossipTopic">GossipTopic</a></div><div class="desc docblock-short">Subscribed gossip topic.</div></li><li><div class="item-name"><a class="struct" href="struct.JoinOptions.html" title="struct iroh::gossip::net::JoinOptions">JoinOptions</a></div><div class="desc docblock-short">Options for joining a gossip topic.</div></li><li><div class="item-name"><a class="struct" href="struct.Message.html" title="struct iroh::gossip::net::Message">Message</a></div><div class="desc docblock-short">A gossip message</div></li></ul><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="enum" href="enum.Command.html" title="enum iroh::gossip::net::Command">Command</a></div><div class="desc docblock-short">Send a gossip message</div></li><li><div class="item-name"><a class="enum" href="enum.Event.html" title="enum iroh::gossip::net::Event">Event</a></div><div class="desc docblock-short">Update from a subscribed gossip topic.</div></li><li><div class="item-name"><a class="enum" href="enum.GossipEvent.html" title="enum iroh::gossip::net::GossipEvent">GossipEvent</a></div><div class="desc docblock-short">Gossip event
|
||||
An event to be emitted to the application for a particular topic.</div></li></ul><h2 id="constants" class="section-header">Constants<a href="#constants" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="constant" href="constant.GOSSIP_ALPN.html" title="constant iroh::gossip::net::GOSSIP_ALPN">GOSSIP_ALPN</a></div><div class="desc docblock-short">ALPN protocol name</div></li></ul><h2 id="types" class="section-header">Type Aliases<a href="#types" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="type" href="type.CommandStream.html" title="type iroh::gossip::net::CommandStream">CommandStream</a></div><div class="desc docblock-short">A stream of commands for a gossip subscription.</div></li><li><div class="item-name"><a class="type" href="type.ProtoCommand.html" title="type iroh::gossip::net::ProtoCommand">ProtoCommand</a></div><div class="desc docblock-short">Commands for the gossip protocol</div></li><li><div class="item-name"><a class="type" href="type.ProtoEvent.html" title="type iroh::gossip::net::ProtoEvent">ProtoEvent</a></div><div class="desc docblock-short">Events emitted from the gossip protocol</div></li></ul></section></div></main></body></html>
|
||||
</div></details><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="mod" href="util/index.html" title="mod iroh::gossip::net::util">util</a></div><div class="desc docblock-short">Utilities for iroh-gossip networking</div></li></ul><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.Gossip.html" title="struct iroh::gossip::net::Gossip">Gossip</a></div><div class="desc docblock-short">Publish and subscribe on gossiping topics.</div></li><li><div class="item-name"><a class="struct" href="struct.GossipReceiver.html" title="struct iroh::gossip::net::GossipReceiver">GossipReceiver</a></div><div class="desc docblock-short">Receiver for gossip events on a topic.</div></li><li><div class="item-name"><a class="struct" href="struct.GossipSender.html" title="struct iroh::gossip::net::GossipSender">GossipSender</a></div><div class="desc docblock-short">Sender for a gossip topic.</div></li><li><div class="item-name"><a class="struct" href="struct.GossipTopic.html" title="struct iroh::gossip::net::GossipTopic">GossipTopic</a></div><div class="desc docblock-short">Subscribed gossip topic.</div></li><li><div class="item-name"><a class="struct" href="struct.JoinOptions.html" title="struct iroh::gossip::net::JoinOptions">JoinOptions</a></div><div class="desc docblock-short">Options for joining a gossip topic.</div></li><li><div class="item-name"><a class="struct" href="struct.Message.html" title="struct iroh::gossip::net::Message">Message</a></div><div class="desc docblock-short">A gossip message</div></li></ul><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="enum" href="enum.Command.html" title="enum iroh::gossip::net::Command">Command</a></div><div class="desc docblock-short">Send a gossip message</div></li><li><div class="item-name"><a class="enum" href="enum.Event.html" title="enum iroh::gossip::net::Event">Event</a></div><div class="desc docblock-short">Events emitted from a gossip topic with a lagging notification.</div></li><li><div class="item-name"><a class="enum" href="enum.GossipEvent.html" title="enum iroh::gossip::net::GossipEvent">GossipEvent</a></div><div class="desc docblock-short">Events emitted from a gossip topic.</div></li></ul><h2 id="constants" class="section-header">Constants<a href="#constants" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="constant" href="constant.GOSSIP_ALPN.html" title="constant iroh::gossip::net::GOSSIP_ALPN">GOSSIP_ALPN</a></div><div class="desc docblock-short">ALPN protocol name</div></li></ul><h2 id="types" class="section-header">Type Aliases<a href="#types" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="type" href="type.CommandStream.html" title="type iroh::gossip::net::CommandStream">CommandStream</a></div><div class="desc docblock-short">A stream of commands for a gossip subscription.</div></li><li><div class="item-name"><a class="type" href="type.ProtoCommand.html" title="type iroh::gossip::net::ProtoCommand">ProtoCommand</a></div><div class="desc docblock-short">Commands for the gossip protocol</div></li><li><div class="item-name"><a class="type" href="type.ProtoEvent.html" title="type iroh::gossip::net::ProtoEvent">ProtoEvent</a></div><div class="desc docblock-short">Events emitted from the gossip protocol</div></li></ul></section></div></main></body></html>
|
||||
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,2 +1,2 @@
|
||||
<!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="A stream of commands for a gossip subscription."><title>CommandStream in iroh::gossip::net - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-b21aa549bf6d91ff.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.80.0-nightly (c987ad527 2024-05-01)" data-channel="nightly" data-search-js="search-bf21c90c8c1d92b1.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../../static.files/storage-e32f0c247825364d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-09095024cf37855e.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc type"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../iroh/index.html">iroh</a><span class="version">0.22.0</span></h2></div><h2 class="location"><a href="#">CommandStream</a></h2><div class="sidebar-elems"><section><h3><a href="#aliased-type">Aliased type</a></h3></section><h2><a href="index.html">In iroh::gossip::net</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../../iroh/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Type ‘S’ or ‘/’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings">Settings</a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Type Alias <a href="../../index.html">iroh</a>::<wbr><a href="../index.html">gossip</a>::<wbr><a href="index.html">net</a>::<wbr><a class="type" href="#">CommandStream</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../../src/iroh_gossip/net/handles.rs.html#217">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub type CommandStream = <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn Stream<Item = <a class="enum" href="enum.Command.html" title="enum iroh::gossip::net::Command">Command</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>>>;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A stream of commands for a gossip subscription.</p>
|
||||
<!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="A stream of commands for a gossip subscription."><title>CommandStream in iroh::gossip::net - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-b21aa549bf6d91ff.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.80.0-nightly (c987ad527 2024-05-01)" data-channel="nightly" data-search-js="search-bf21c90c8c1d92b1.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../../static.files/storage-e32f0c247825364d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-09095024cf37855e.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc type"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../iroh/index.html">iroh</a><span class="version">0.22.0</span></h2></div><h2 class="location"><a href="#">CommandStream</a></h2><div class="sidebar-elems"><section><h3><a href="#aliased-type">Aliased type</a></h3></section><h2><a href="index.html">In iroh::gossip::net</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../../iroh/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Type ‘S’ or ‘/’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings">Settings</a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Type Alias <a href="../../index.html">iroh</a>::<wbr><a href="../index.html">gossip</a>::<wbr><a href="index.html">net</a>::<wbr><a class="type" href="#">CommandStream</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../../src/iroh_gossip/net/handles.rs.html#239">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub type CommandStream = <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn Stream<Item = <a class="enum" href="enum.Command.html" title="enum iroh::gossip::net::Command">Command</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>>>;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A stream of commands for a gossip subscription.</p>
|
||||
</div></details><h2 id="aliased-type" class="section-header">Aliased Type<a href="#aliased-type" class="anchor">§</a></h2><pre class="rust item-decl"><code>struct CommandStream { <span class="comment">/* private fields */</span> }</code></pre><script src="../../../type.impl/core/pin/struct.Pin.js" data-self-path="iroh::gossip::net::CommandStream" async></script></section></div></main></body></html>
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,2 +1,2 @@
|
||||
<!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="The default bind addr of the RPC ."><title>DEFAULT_RPC_ADDR in iroh::node - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-b21aa549bf6d91ff.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.80.0-nightly (c987ad527 2024-05-01)" data-channel="nightly" data-search-js="search-bf21c90c8c1d92b1.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-e32f0c247825364d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-09095024cf37855e.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc constant"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh/index.html">iroh</a><span class="version">0.22.0</span></h2></div><div class="sidebar-elems"><h2><a href="index.html">In iroh::node</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../iroh/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Type ‘S’ or ‘/’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings">Settings</a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Constant <a href="../index.html">iroh</a>::<wbr><a href="index.html">node</a>::<wbr><a class="constant" href="#">DEFAULT_RPC_ADDR</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../src/iroh/node/builder.rs.html#896-897">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub const DEFAULT_RPC_ADDR: <a class="enum" href="https://doc.rust-lang.org/nightly/core/net/socket_addr/enum.SocketAddr.html" title="enum core::net::socket_addr::SocketAddr">SocketAddr</a>;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The default bind addr of the RPC .</p>
|
||||
<!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="The default bind addr of the RPC ."><title>DEFAULT_RPC_ADDR in iroh::node - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-b21aa549bf6d91ff.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.80.0-nightly (c987ad527 2024-05-01)" data-channel="nightly" data-search-js="search-bf21c90c8c1d92b1.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-e32f0c247825364d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-09095024cf37855e.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc constant"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh/index.html">iroh</a><span class="version">0.22.0</span></h2></div><div class="sidebar-elems"><h2><a href="index.html">In iroh::node</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../iroh/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Type ‘S’ or ‘/’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings">Settings</a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Constant <a href="../index.html">iroh</a>::<wbr><a href="index.html">node</a>::<wbr><a class="constant" href="#">DEFAULT_RPC_ADDR</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../src/iroh/node/builder.rs.html#875-876">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub const DEFAULT_RPC_ADDR: <a class="enum" href="https://doc.rust-lang.org/nightly/core/net/socket_addr/enum.SocketAddr.html" title="enum core::net::socket_addr::SocketAddr">SocketAddr</a>;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The default bind addr of the RPC .</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
File diff suppressed because one or more lines are too long
@@ -18,24 +18,23 @@ using <a href="struct.Node.html#method.shutdown" title="method iroh::node::Node:
|
||||
docs_storage: <a class="enum" href="enum.DocsStorage.html" title="enum iroh::node::DocsStorage">DocsStorage</a>,
|
||||
storage: <a class="enum" href="enum.StorageConfig.html" title="enum iroh::node::StorageConfig">StorageConfig</a>
|
||||
) -> Self</h4></section></summary><div class="docblock"><p>Creates a new builder for <a href="struct.Node.html" title="struct iroh::node::Node"><code>Node</code></a> using the given databases.</p>
|
||||
</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Builder%3CD%3E-1" class="impl"><a class="src rightside" href="../../src/iroh/node/builder.rs.html#281-306">source</a><a href="#impl-Builder%3CD%3E-1" class="anchor">§</a><h3 class="code-header">impl<D> <a class="struct" href="struct.Builder.html" title="struct iroh::node::Builder">Builder</a><D><div class="where">where
|
||||
D: <a class="trait" href="../blobs/store/trait.Store.html" title="trait iroh::blobs::store::Store">BaoStore</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.set_blobs_events" class="method"><a class="src rightside" href="../../src/iroh/node/builder.rs.html#286-305">source</a><h4 class="code-header">pub fn <a href="#method.set_blobs_events" class="fn">set_blobs_events</a>(self, blob_events: <a class="struct" href="../blobs/provider/struct.EventSender.html" title="struct iroh::blobs::provider::EventSender">EventSender</a>) -> <a class="struct" href="struct.Builder.html" title="struct iroh::node::Builder">Builder</a><D></h4></section></summary><div class="docblock"><p>Set the blobs event sender.</p>
|
||||
</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Builder%3CD%3E-2" class="impl"><a class="src rightside" href="../../src/iroh/node/builder.rs.html#308-666">source</a><a href="#impl-Builder%3CD%3E-2" class="anchor">§</a><h3 class="code-header">impl<D> <a class="struct" href="struct.Builder.html" title="struct iroh::node::Builder">Builder</a><D><div class="where">where
|
||||
D: <a class="trait" href="../blobs/store/trait.Store.html" title="trait iroh::blobs::store::Store">BaoStore</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.persist" class="method"><a class="src rightside" href="../../src/iroh/node/builder.rs.html#313-370">source</a><h4 class="code-header">pub async fn <a href="#method.persist" class="fn">persist</a>(self, root: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="struct" href="https://doc.rust-lang.org/nightly/std/path/struct.Path.html" title="struct std::path::Path">Path</a>>) -> <a class="type" href="https://docs.rs/anyhow/1.0.85/anyhow/type.Result.html" title="type anyhow::Result">Result</a><<a class="struct" href="struct.Builder.html" title="struct iroh::node::Builder">Builder</a><<a class="struct" href="../blobs/store/fs/struct.Store.html" title="struct iroh::blobs::store::fs::Store">Store</a>>></h4></section></summary><div class="docblock"><p>Persist all node data in the provided directory.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.rpc_endpoint" class="method"><a class="src rightside" href="../../src/iroh/node/builder.rs.html#373-379">source</a><h4 class="code-header">pub fn <a href="#method.rpc_endpoint" class="fn">rpc_endpoint</a>(
|
||||
</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Builder%3CD%3E-1" class="impl"><a class="src rightside" href="../../src/iroh/node/builder.rs.html#281-645">source</a><a href="#impl-Builder%3CD%3E-1" class="anchor">§</a><h3 class="code-header">impl<D> <a class="struct" href="struct.Builder.html" title="struct iroh::node::Builder">Builder</a><D><div class="where">where
|
||||
D: <a class="trait" href="../blobs/store/trait.Store.html" title="trait iroh::blobs::store::Store">BaoStore</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.set_blobs_events" class="method"><a class="src rightside" href="../../src/iroh/node/builder.rs.html#286-289">source</a><h4 class="code-header">pub fn <a href="#method.set_blobs_events" class="fn">set_blobs_events</a>(self, blob_events: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="../blobs/provider/struct.EventSender.html" title="struct iroh::blobs::provider::EventSender">EventSender</a>>) -> Self</h4></section></summary><div class="docblock"><p>Set the blobs event sender.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.persist" class="method"><a class="src rightside" href="../../src/iroh/node/builder.rs.html#292-349">source</a><h4 class="code-header">pub async fn <a href="#method.persist" class="fn">persist</a>(self, root: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="struct" href="https://doc.rust-lang.org/nightly/std/path/struct.Path.html" title="struct std::path::Path">Path</a>>) -> <a class="type" href="https://docs.rs/anyhow/1.0.85/anyhow/type.Result.html" title="type anyhow::Result">Result</a><<a class="struct" href="struct.Builder.html" title="struct iroh::node::Builder">Builder</a><<a class="struct" href="../blobs/store/fs/struct.Store.html" title="struct iroh::blobs::store::fs::Store">Store</a>>></h4></section></summary><div class="docblock"><p>Persist all node data in the provided directory.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.rpc_endpoint" class="method"><a class="src rightside" href="../../src/iroh/node/builder.rs.html#352-358">source</a><h4 class="code-header">pub fn <a href="#method.rpc_endpoint" class="fn">rpc_endpoint</a>(
|
||||
self,
|
||||
value: <a class="type" href="type.IrohServerEndpoint.html" title="type iroh::node::IrohServerEndpoint">IrohServerEndpoint</a>,
|
||||
rpc_addr: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/net/socket_addr/enum.SocketAddr.html" title="enum core::net::socket_addr::SocketAddr">SocketAddr</a>>
|
||||
) -> Self</h4></section></summary><div class="docblock"><p>Configure rpc endpoint.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.enable_rpc" class="method"><a class="src rightside" href="../../src/iroh/node/builder.rs.html#382-384">source</a><h4 class="code-header">pub async fn <a href="#method.enable_rpc" class="fn">enable_rpc</a>(self) -> <a class="type" href="https://docs.rs/anyhow/1.0.85/anyhow/type.Result.html" title="type anyhow::Result">Result</a><<a class="struct" href="struct.Builder.html" title="struct iroh::node::Builder">Builder</a><D>></h4></section></summary><div class="docblock"><p>Configure the default iroh rpc endpoint, on the default address.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.enable_rpc_with_addr" class="method"><a class="src rightside" href="../../src/iroh/node/builder.rs.html#387-402">source</a><h4 class="code-header">pub async fn <a href="#method.enable_rpc_with_addr" class="fn">enable_rpc_with_addr</a>(
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.enable_rpc" class="method"><a class="src rightside" href="../../src/iroh/node/builder.rs.html#361-363">source</a><h4 class="code-header">pub async fn <a href="#method.enable_rpc" class="fn">enable_rpc</a>(self) -> <a class="type" href="https://docs.rs/anyhow/1.0.85/anyhow/type.Result.html" title="type anyhow::Result">Result</a><<a class="struct" href="struct.Builder.html" title="struct iroh::node::Builder">Builder</a><D>></h4></section></summary><div class="docblock"><p>Configure the default iroh rpc endpoint, on the default address.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.enable_rpc_with_addr" class="method"><a class="src rightside" href="../../src/iroh/node/builder.rs.html#366-381">source</a><h4 class="code-header">pub async fn <a href="#method.enable_rpc_with_addr" class="fn">enable_rpc_with_addr</a>(
|
||||
self,
|
||||
rpc_addr: <a class="enum" href="https://doc.rust-lang.org/nightly/core/net/socket_addr/enum.SocketAddr.html" title="enum core::net::socket_addr::SocketAddr">SocketAddr</a>
|
||||
) -> <a class="type" href="https://docs.rs/anyhow/1.0.85/anyhow/type.Result.html" title="type anyhow::Result">Result</a><<a class="struct" href="struct.Builder.html" title="struct iroh::node::Builder">Builder</a><D>></h4></section></summary><div class="docblock"><p>Configure the default iroh rpc endpoint.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.gc_policy" class="method"><a class="src rightside" href="../../src/iroh/node/builder.rs.html#407-410">source</a><h4 class="code-header">pub fn <a href="#method.gc_policy" class="fn">gc_policy</a>(self, gc_policy: <a class="enum" href="enum.GcPolicy.html" title="enum iroh::node::GcPolicy">GcPolicy</a>) -> Self</h4></section></summary><div class="docblock"><p>Sets the garbage collection policy.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.gc_policy" class="method"><a class="src rightside" href="../../src/iroh/node/builder.rs.html#386-389">source</a><h4 class="code-header">pub fn <a href="#method.gc_policy" class="fn">gc_policy</a>(self, gc_policy: <a class="enum" href="enum.GcPolicy.html" title="enum iroh::node::GcPolicy">GcPolicy</a>) -> Self</h4></section></summary><div class="docblock"><p>Sets the garbage collection policy.</p>
|
||||
<p>By default garbage collection is disabled.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.disable_docs" class="method"><a class="src rightside" href="../../src/iroh/node/builder.rs.html#413-416">source</a><h4 class="code-header">pub fn <a href="#method.disable_docs" class="fn">disable_docs</a>(self) -> Self</h4></section></summary><div class="docblock"><p>Disables documents support on this node completely.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.relay_mode" class="method"><a class="src rightside" href="../../src/iroh/node/builder.rs.html#432-435">source</a><h4 class="code-header">pub fn <a href="#method.relay_mode" class="fn">relay_mode</a>(self, relay_mode: <a class="enum" href="../net/relay/enum.RelayMode.html" title="enum iroh::net::relay::RelayMode">RelayMode</a>) -> Self</h4></section></summary><div class="docblock"><p>Sets the relay servers to assist in establishing connectivity.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.disable_docs" class="method"><a class="src rightside" href="../../src/iroh/node/builder.rs.html#392-395">source</a><h4 class="code-header">pub fn <a href="#method.disable_docs" class="fn">disable_docs</a>(self) -> Self</h4></section></summary><div class="docblock"><p>Disables documents support on this node completely.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.relay_mode" class="method"><a class="src rightside" href="../../src/iroh/node/builder.rs.html#411-414">source</a><h4 class="code-header">pub fn <a href="#method.relay_mode" class="fn">relay_mode</a>(self, relay_mode: <a class="enum" href="../net/relay/enum.RelayMode.html" title="enum iroh::net::relay::RelayMode">RelayMode</a>) -> Self</h4></section></summary><div class="docblock"><p>Sets the relay servers to assist in establishing connectivity.</p>
|
||||
<p>Relay servers are used to discover other nodes by <code>PublicKey</code> and also help
|
||||
establish connections between peers by being an initial relay for traffic while
|
||||
assisting in holepunching to establish a direct connection between peers.</p>
|
||||
@@ -45,33 +44,33 @@ configured relay node. If an invalid <a href="../net/relay/enum.RelayMode.html"
|
||||
<h5 id="usage-during-tests"><a class="doc-anchor" href="#usage-during-tests">§</a>Usage during tests</h5>
|
||||
<p>Note that while the default is <a href="../net/relay/enum.RelayMode.html#variant.Default" title="variant iroh::net::relay::RelayMode::Default"><code>RelayMode::Default</code></a>, when using <code>cfg(test)</code> or
|
||||
when the <code>test-utils</code> cargo feature <a href="../net/relay/enum.RelayMode.html#variant.Staging" title="variant iroh::net::relay::RelayMode::Staging"><code>RelayMode::Staging</code></a> is the default.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.node_discovery" class="method"><a class="src rightside" href="../../src/iroh/node/builder.rs.html#448-451">source</a><h4 class="code-header">pub fn <a href="#method.node_discovery" class="fn">node_discovery</a>(self, config: <a class="enum" href="enum.DiscoveryConfig.html" title="enum iroh::node::DiscoveryConfig">DiscoveryConfig</a>) -> Self</h4></section></summary><div class="docblock"><p>Sets the node discovery mechanism.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.node_discovery" class="method"><a class="src rightside" href="../../src/iroh/node/builder.rs.html#427-430">source</a><h4 class="code-header">pub fn <a href="#method.node_discovery" class="fn">node_discovery</a>(self, config: <a class="enum" href="enum.DiscoveryConfig.html" title="enum iroh::node::DiscoveryConfig">DiscoveryConfig</a>) -> Self</h4></section></summary><div class="docblock"><p>Sets the node discovery mechanism.</p>
|
||||
<p>Node discovery enables connecting to other peers by only the <a href="../net/type.NodeId.html" title="type iroh::net::NodeId"><code>NodeId</code></a>. This
|
||||
usually works by the nodes publishing their <a href="../net/relay/struct.RelayUrl.html" title="struct iroh::net::relay::RelayUrl"><code>RelayUrl</code></a> and/or their direct
|
||||
addresses to some publicly available service.</p>
|
||||
<p>See <a href="enum.DiscoveryConfig.html#method.default" title="associated function iroh::node::DiscoveryConfig::default"><code>DiscoveryConfig::default</code></a> for the defaults, note that the defaults change
|
||||
when using <code>cfg(test)</code>.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.dns_resolver" class="method"><a class="src rightside" href="../../src/iroh/node/builder.rs.html#461-464">source</a><h4 class="code-header">pub fn <a href="#method.dns_resolver" class="fn">dns_resolver</a>(self, dns_resolver: <a class="type" href="../net/dns/type.DnsResolver.html" title="type iroh::net::dns::DnsResolver">DnsResolver</a>) -> Self</h4></section></summary><div class="docblock"><p>Optionally set a custom DNS resolver to use for the magic endpoint.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.dns_resolver" class="method"><a class="src rightside" href="../../src/iroh/node/builder.rs.html#440-443">source</a><h4 class="code-header">pub fn <a href="#method.dns_resolver" class="fn">dns_resolver</a>(self, dns_resolver: <a class="type" href="../net/dns/type.DnsResolver.html" title="type iroh::net::dns::DnsResolver">DnsResolver</a>) -> Self</h4></section></summary><div class="docblock"><p>Optionally set a custom DNS resolver to use for the magic endpoint.</p>
|
||||
<p>The DNS resolver is used to resolve relay hostnames, and node addresses if
|
||||
<a href="../net/discovery/dns/struct.DnsDiscovery.html" title="struct iroh::net::discovery::dns::DnsDiscovery"><code>DnsDiscovery</code></a> is configured (which is the default).</p>
|
||||
<p>By default, all magic endpoints share a DNS resolver, which is configured to use the
|
||||
host system’s DNS configuration. You can pass a custom instance of <a href="../net/dns/type.DnsResolver.html" title="type iroh::net::dns::DnsResolver"><code>DnsResolver</code></a>
|
||||
here to use a differently configured DNS resolver for this endpoint.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.bind_port" class="method"><a class="src rightside" href="../../src/iroh/node/builder.rs.html#469-472">source</a><h4 class="code-header">pub fn <a href="#method.bind_port" class="fn">bind_port</a>(self, port: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>) -> Self</h4></section></summary><div class="docblock"><p>Binds the node service to a different socket.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.bind_port" class="method"><a class="src rightside" href="../../src/iroh/node/builder.rs.html#448-451">source</a><h4 class="code-header">pub fn <a href="#method.bind_port" class="fn">bind_port</a>(self, port: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>) -> Self</h4></section></summary><div class="docblock"><p>Binds the node service to a different socket.</p>
|
||||
<p>By default it binds to <code>127.0.0.1:11204</code>.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.secret_key" class="method"><a class="src rightside" href="../../src/iroh/node/builder.rs.html#475-478">source</a><h4 class="code-header">pub fn <a href="#method.secret_key" class="fn">secret_key</a>(self, secret_key: <a class="struct" href="../net/key/struct.SecretKey.html" title="struct iroh::net::key::SecretKey">SecretKey</a>) -> Self</h4></section></summary><div class="docblock"><p>Uses the given <a href="../net/key/struct.SecretKey.html" title="struct iroh::net::key::SecretKey"><code>SecretKey</code></a> for the <code>PublicKey</code> instead of a newly generated one.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.insecure_skip_relay_cert_verify" class="method"><a class="src rightside" href="../../src/iroh/node/builder.rs.html#484-487">source</a><h4 class="code-header">pub fn <a href="#method.insecure_skip_relay_cert_verify" class="fn">insecure_skip_relay_cert_verify</a>(self, skip_verify: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -> Self</h4></section></summary><div class="docblock"><p>Skip verification of SSL certificates from relay servers</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.secret_key" class="method"><a class="src rightside" href="../../src/iroh/node/builder.rs.html#454-457">source</a><h4 class="code-header">pub fn <a href="#method.secret_key" class="fn">secret_key</a>(self, secret_key: <a class="struct" href="../net/key/struct.SecretKey.html" title="struct iroh::net::key::SecretKey">SecretKey</a>) -> Self</h4></section></summary><div class="docblock"><p>Uses the given <a href="../net/key/struct.SecretKey.html" title="struct iroh::net::key::SecretKey"><code>SecretKey</code></a> for the <code>PublicKey</code> instead of a newly generated one.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.insecure_skip_relay_cert_verify" class="method"><a class="src rightside" href="../../src/iroh/node/builder.rs.html#463-466">source</a><h4 class="code-header">pub fn <a href="#method.insecure_skip_relay_cert_verify" class="fn">insecure_skip_relay_cert_verify</a>(self, skip_verify: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -> Self</h4></section></summary><div class="docblock"><p>Skip verification of SSL certificates from relay servers</p>
|
||||
<p>May only be used in tests.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.register_gc_done_cb" class="method"><a class="src rightside" href="../../src/iroh/node/builder.rs.html#491-494">source</a><h4 class="code-header">pub fn <a href="#method.register_gc_done_cb" class="fn">register_gc_done_cb</a>(self, cb: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>() + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>>) -> Self</h4></section></summary><div class="docblock"><p>Register a callback for when GC is done.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.keylog" class="method"><a class="src rightside" href="../../src/iroh/node/builder.rs.html#501-504">source</a><h4 class="code-header">pub fn <a href="#method.keylog" class="fn">keylog</a>(self, keylog: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -> Self</h4></section></summary><div class="docblock"><p>Whether to log the SSL pre-master key.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.register_gc_done_cb" class="method"><a class="src rightside" href="../../src/iroh/node/builder.rs.html#470-473">source</a><h4 class="code-header">pub fn <a href="#method.register_gc_done_cb" class="fn">register_gc_done_cb</a>(self, cb: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>() + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>>) -> Self</h4></section></summary><div class="docblock"><p>Register a callback for when GC is done.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.keylog" class="method"><a class="src rightside" href="../../src/iroh/node/builder.rs.html#480-483">source</a><h4 class="code-header">pub fn <a href="#method.keylog" class="fn">keylog</a>(self, keylog: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -> Self</h4></section></summary><div class="docblock"><p>Whether to log the SSL pre-master key.</p>
|
||||
<p>If <code>true</code> and the <code>SSLKEYLOGFILE</code> environment variable is the path to a file this
|
||||
file will be used to log the SSL pre-master key. This is useful to inspect captured
|
||||
traffic.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.spawn" class="method"><a class="src rightside" href="../../src/iroh/node/builder.rs.html#511-514">source</a><h4 class="code-header">pub async fn <a href="#method.spawn" class="fn">spawn</a>(self) -> <a class="type" href="https://docs.rs/anyhow/1.0.85/anyhow/type.Result.html" title="type anyhow::Result">Result</a><<a class="struct" href="struct.Node.html" title="struct iroh::node::Node">Node</a><D>></h4></section></summary><div class="docblock"><p>Spawns the <a href="struct.Node.html" title="struct iroh::node::Node"><code>Node</code></a> in a tokio task.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.spawn" class="method"><a class="src rightside" href="../../src/iroh/node/builder.rs.html#490-493">source</a><h4 class="code-header">pub async fn <a href="#method.spawn" class="fn">spawn</a>(self) -> <a class="type" href="https://docs.rs/anyhow/1.0.85/anyhow/type.Result.html" title="type anyhow::Result">Result</a><<a class="struct" href="struct.Node.html" title="struct iroh::node::Node">Node</a><D>></h4></section></summary><div class="docblock"><p>Spawns the <a href="struct.Node.html" title="struct iroh::node::Node"><code>Node</code></a> in a tokio task.</p>
|
||||
<p>This will create the underlying network server and spawn a tokio task accepting
|
||||
connections. The returned <a href="struct.Node.html" title="struct iroh::node::Node"><code>Node</code></a> can be used to control the task as well as
|
||||
get information about it.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.build" class="method"><a class="src rightside" href="../../src/iroh/node/builder.rs.html#520-530">source</a><h4 class="code-header">pub async fn <a href="#method.build" class="fn">build</a>(self) -> <a class="type" href="https://docs.rs/anyhow/1.0.85/anyhow/type.Result.html" title="type anyhow::Result">Result</a><<a class="struct" href="struct.ProtocolBuilder.html" title="struct iroh::node::ProtocolBuilder">ProtocolBuilder</a><D>></h4></section></summary><div class="docblock"><p>Builds a node without spawning it.</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.build" class="method"><a class="src rightside" href="../../src/iroh/node/builder.rs.html#499-509">source</a><h4 class="code-header">pub async fn <a href="#method.build" class="fn">build</a>(self) -> <a class="type" href="https://docs.rs/anyhow/1.0.85/anyhow/type.Result.html" title="type anyhow::Result">Result</a><<a class="struct" href="struct.ProtocolBuilder.html" title="struct iroh::node::ProtocolBuilder">ProtocolBuilder</a><D>></h4></section></summary><div class="docblock"><p>Builds a node without spawning it.</p>
|
||||
<p>Returns a <a href="struct.ProtocolBuilder.html" title="struct iroh::node::ProtocolBuilder"><code>ProtocolBuilder</code></a>, on which custom protocols can be registered with
|
||||
<a href="struct.ProtocolBuilder.html#method.accept" title="method iroh::node::ProtocolBuilder::accept"><code>ProtocolBuilder::accept</code></a>. To spawn the node, call <a href="struct.ProtocolBuilder.html#method.spawn" title="method iroh::node::ProtocolBuilder::spawn"><code>ProtocolBuilder::spawn</code></a>.</p>
|
||||
</div></details></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-Builder%3CD%3E" class="impl"><a class="src rightside" href="../../src/iroh/node/builder.rs.html#94">source</a><a href="#impl-Debug-for-Builder%3CD%3E" class="anchor">§</a><h3 class="code-header">impl<D> <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.Builder.html" title="struct iroh::node::Builder">Builder</a><D><div class="where">where
|
||||
|
||||
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
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="Handle a single connection."><title>handle_connection in iroh_blobs::provider - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-b21aa549bf6d91ff.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="iroh_blobs" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (c987ad527 2024-05-01)" data-channel="nightly" data-search-js="search-bf21c90c8c1d92b1.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-e32f0c247825364d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-09095024cf37855e.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh_blobs/index.html">iroh_blobs</a><span class="version">0.22.0</span></h2></div><div class="sidebar-elems"><h2><a href="index.html">In iroh_blobs::provider</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../iroh_blobs/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Type ‘S’ or ‘/’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings">Settings</a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Function <a href="../index.html">iroh_blobs</a>::<wbr><a href="index.html">provider</a>::<wbr><a class="fn" href="#">handle_connection</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../src/iroh_blobs/provider.rs.html#308-344">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub async fn handle_connection<D: <a class="trait" href="../store/trait.Map.html" title="trait iroh_blobs::store::Map">Map</a>>(
|
||||
<!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="Handle a single connection."><title>handle_connection in iroh_blobs::provider - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-b21aa549bf6d91ff.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="iroh_blobs" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (c987ad527 2024-05-01)" data-channel="nightly" data-search-js="search-bf21c90c8c1d92b1.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-e32f0c247825364d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-09095024cf37855e.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh_blobs/index.html">iroh_blobs</a><span class="version">0.22.0</span></h2></div><div class="sidebar-elems"><h2><a href="index.html">In iroh_blobs::provider</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../iroh_blobs/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Type ‘S’ or ‘/’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings">Settings</a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Function <a href="../index.html">iroh_blobs</a>::<wbr><a href="index.html">provider</a>::<wbr><a class="fn" href="#">handle_connection</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../src/iroh_blobs/provider.rs.html#354-390">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub async fn handle_connection<D: <a class="trait" href="../store/trait.Map.html" title="trait iroh_blobs::store::Map">Map</a>>(
|
||||
connection: Connection,
|
||||
db: D,
|
||||
events: <a class="struct" href="struct.EventSender.html" title="struct iroh_blobs::provider::EventSender">EventSender</a>,
|
||||
|
||||
@@ -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="Handle a single standard get request."><title>handle_get in iroh_blobs::provider - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-b21aa549bf6d91ff.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="iroh_blobs" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (c987ad527 2024-05-01)" data-channel="nightly" data-search-js="search-bf21c90c8c1d92b1.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-e32f0c247825364d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-09095024cf37855e.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh_blobs/index.html">iroh_blobs</a><span class="version">0.22.0</span></h2></div><div class="sidebar-elems"><h2><a href="index.html">In iroh_blobs::provider</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../iroh_blobs/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Type ‘S’ or ‘/’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings">Settings</a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Function <a href="../index.html">iroh_blobs</a>::<wbr><a href="index.html">provider</a>::<wbr><a class="fn" href="#">handle_get</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../src/iroh_blobs/provider.rs.html#363-419">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub async fn handle_get<D: <a class="trait" href="../store/trait.Map.html" title="trait iroh_blobs::store::Map">Map</a>>(
|
||||
<!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="Handle a single standard get request."><title>handle_get in iroh_blobs::provider - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-b21aa549bf6d91ff.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="iroh_blobs" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (c987ad527 2024-05-01)" data-channel="nightly" data-search-js="search-bf21c90c8c1d92b1.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-e32f0c247825364d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-09095024cf37855e.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh_blobs/index.html">iroh_blobs</a><span class="version">0.22.0</span></h2></div><div class="sidebar-elems"><h2><a href="index.html">In iroh_blobs::provider</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../iroh_blobs/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Type ‘S’ or ‘/’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings">Settings</a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Function <a href="../index.html">iroh_blobs</a>::<wbr><a href="index.html">provider</a>::<wbr><a class="fn" href="#">handle_get</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../src/iroh_blobs/provider.rs.html#409-465">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub async fn handle_get<D: <a class="trait" href="../store/trait.Map.html" title="trait iroh_blobs::store::Map">Map</a>>(
|
||||
db: D,
|
||||
request: <a class="struct" href="../protocol/struct.GetRequest.html" title="struct iroh_blobs::protocol::GetRequest">GetRequest</a>,
|
||||
writer: <a class="struct" href="struct.ResponseWriter.html" title="struct iroh_blobs::provider::ResponseWriter">ResponseWriter</a>
|
||||
|
||||
@@ -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="Read the request from the getter."><title>read_request in iroh_blobs::provider - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-b21aa549bf6d91ff.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="iroh_blobs" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (c987ad527 2024-05-01)" data-channel="nightly" data-search-js="search-bf21c90c8c1d92b1.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-e32f0c247825364d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-09095024cf37855e.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh_blobs/index.html">iroh_blobs</a><span class="version">0.22.0</span></h2></div><div class="sidebar-elems"><h2><a href="index.html">In iroh_blobs::provider</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../iroh_blobs/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Type ‘S’ or ‘/’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings">Settings</a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Function <a href="../index.html">iroh_blobs</a>::<wbr><a href="index.html">provider</a>::<wbr><a class="fn" href="#">read_request</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../src/iroh_blobs/provider.rs.html#163-169">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub async fn read_request(reader: RecvStream) -> <a class="type" href="https://docs.rs/anyhow/1.0.85/anyhow/type.Result.html" title="type anyhow::Result">Result</a><<a class="enum" href="../protocol/enum.Request.html" title="enum iroh_blobs::protocol::Request">Request</a>></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Read the request from the getter.</p>
|
||||
<!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="Read the request from the getter."><title>read_request in iroh_blobs::provider - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-b21aa549bf6d91ff.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="iroh_blobs" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (c987ad527 2024-05-01)" data-channel="nightly" data-search-js="search-bf21c90c8c1d92b1.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-e32f0c247825364d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-09095024cf37855e.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh_blobs/index.html">iroh_blobs</a><span class="version">0.22.0</span></h2></div><div class="sidebar-elems"><h2><a href="index.html">In iroh_blobs::provider</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../iroh_blobs/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Type ‘S’ or ‘/’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings">Settings</a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Function <a href="../index.html">iroh_blobs</a>::<wbr><a href="index.html">provider</a>::<wbr><a class="fn" href="#">read_request</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../src/iroh_blobs/provider.rs.html#165-171">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub async fn read_request(reader: RecvStream) -> <a class="type" href="https://docs.rs/anyhow/1.0.85/anyhow/type.Result.html" title="type anyhow::Result">Result</a><<a class="enum" href="../protocol/enum.Request.html" title="enum iroh_blobs::protocol::Request">Request</a>></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Read the request from the getter.</p>
|
||||
<p>Will fail if there is an error while reading, if the reader
|
||||
contains more data than the Request, or if no valid request is sent.</p>
|
||||
<p>When successful, the buffer is empty after this function call.</p>
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
<!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="Send a blob to the client."><title>send_blob in iroh_blobs::provider - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-b21aa549bf6d91ff.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="iroh_blobs" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (c987ad527 2024-05-01)" data-channel="nightly" data-search-js="search-bf21c90c8c1d92b1.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-e32f0c247825364d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-09095024cf37855e.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh_blobs/index.html">iroh_blobs</a><span class="version">0.22.0</span></h2></div><div class="sidebar-elems"><h2><a href="index.html">In iroh_blobs::provider</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../iroh_blobs/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Type ‘S’ or ‘/’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings">Settings</a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Function <a href="../index.html">iroh_blobs</a>::<wbr><a href="index.html">provider</a>::<wbr><a class="fn" href="#">send_blob</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../src/iroh_blobs/provider.rs.html#507-535">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub async fn send_blob<D: <a class="trait" href="../store/trait.Map.html" title="trait iroh_blobs::store::Map">Map</a>, W: AsyncStreamWriter>(
|
||||
<!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="Send a blob to the client."><title>send_blob in iroh_blobs::provider - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-b21aa549bf6d91ff.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="iroh_blobs" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (c987ad527 2024-05-01)" data-channel="nightly" data-search-js="search-bf21c90c8c1d92b1.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-e32f0c247825364d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-09095024cf37855e.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh_blobs/index.html">iroh_blobs</a><span class="version">0.22.0</span></h2></div><div class="sidebar-elems"><h2><a href="index.html">In iroh_blobs::provider</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../iroh_blobs/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Type ‘S’ or ‘/’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings">Settings</a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Function <a href="../index.html">iroh_blobs</a>::<wbr><a href="index.html">provider</a>::<wbr><a class="fn" href="#">send_blob</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../src/iroh_blobs/provider.rs.html#553-584">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub async fn send_blob<D: <a class="trait" href="../store/trait.Map.html" title="trait iroh_blobs::store::Map">Map</a>, W: AsyncStreamWriter>(
|
||||
db: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&D</a>,
|
||||
hash: <a class="struct" href="../struct.Hash.html" title="struct iroh_blobs::Hash">Hash</a>,
|
||||
ranges: &<a class="struct" href="../protocol/struct.RangeSpec.html" title="struct iroh_blobs::protocol::RangeSpec">RangeSpec</a>,
|
||||
writer: W
|
||||
writer: W,
|
||||
events: <a class="struct" href="struct.EventSender.html" title="struct iroh_blobs::provider::EventSender">EventSender</a>,
|
||||
mk_progress: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>) -> <a class="enum" href="enum.Event.html" title="enum iroh_blobs::provider::Event">Event</a>
|
||||
) -> <a class="type" href="https://docs.rs/anyhow/1.0.85/anyhow/type.Result.html" title="type anyhow::Result">Result</a><(<a class="enum" href="enum.SentStatus.html" title="enum iroh_blobs::provider::SentStatus">SentStatus</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>, SliceReaderStats)></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Send a blob to the client.</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
@@ -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="Transfers the collection & blob data."><title>transfer_collection in iroh_blobs::provider - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-b21aa549bf6d91ff.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="iroh_blobs" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (c987ad527 2024-05-01)" data-channel="nightly" data-search-js="search-bf21c90c8c1d92b1.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-e32f0c247825364d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-09095024cf37855e.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh_blobs/index.html">iroh_blobs</a><span class="version">0.22.0</span></h2></div><div class="sidebar-elems"><h2><a href="index.html">In iroh_blobs::provider</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../iroh_blobs/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Type ‘S’ or ‘/’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings">Settings</a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Function <a href="../index.html">iroh_blobs</a>::<wbr><a href="index.html">provider</a>::<wbr><a class="fn" href="#">transfer_collection</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../src/iroh_blobs/provider.rs.html#183-275">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub async fn transfer_collection<D: <a class="trait" href="../store/trait.Map.html" title="trait iroh_blobs::store::Map">Map</a>>(
|
||||
<!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="Transfers the collection & blob data."><title>transfer_collection in iroh_blobs::provider - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-b21aa549bf6d91ff.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="iroh_blobs" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (c987ad527 2024-05-01)" data-channel="nightly" data-search-js="search-bf21c90c8c1d92b1.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-e32f0c247825364d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-09095024cf37855e.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh_blobs/index.html">iroh_blobs</a><span class="version">0.22.0</span></h2></div><div class="sidebar-elems"><h2><a href="index.html">In iroh_blobs::provider</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../iroh_blobs/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Type ‘S’ or ‘/’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings">Settings</a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Function <a href="../index.html">iroh_blobs</a>::<wbr><a href="index.html">provider</a>::<wbr><a class="fn" href="#">transfer_collection</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../src/iroh_blobs/provider.rs.html#185-290">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub async fn transfer_collection<D: <a class="trait" href="../store/trait.Map.html" title="trait iroh_blobs::store::Map">Map</a>>(
|
||||
request: <a class="struct" href="../protocol/struct.GetRequest.html" title="struct iroh_blobs::protocol::GetRequest">GetRequest</a>,
|
||||
db: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&D</a>,
|
||||
writer: &mut <a class="struct" href="struct.ResponseWriter.html" title="struct iroh_blobs::provider::ResponseWriter">ResponseWriter</a>,
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
<!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="The server side API"><title>iroh_blobs::provider - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-b21aa549bf6d91ff.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="iroh_blobs" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (c987ad527 2024-05-01)" data-channel="nightly" data-search-js="search-bf21c90c8c1d92b1.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-e32f0c247825364d.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-09095024cf37855e.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh_blobs/index.html">iroh_blobs</a><span class="version">0.22.0</span></h2></div><h2 class="location"><a href="#">Module provider</a></h2><div class="sidebar-elems"><section><ul class="block"><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#traits">Traits</a></li><li><a href="#functions">Functions</a></li></ul></section><h2><a href="../index.html">In crate iroh_blobs</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../iroh_blobs/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Type ‘S’ or ‘/’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings">Settings</a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Module <a href="../index.html">iroh_blobs</a>::<wbr><a class="mod" href="#">provider</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../src/iroh_blobs/provider.rs.html#1-552">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The server side API</p>
|
||||
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.EventSender.html" title="struct iroh_blobs::provider::EventSender">EventSender</a></div></li><li><div class="item-name"><a class="struct" href="struct.ResponseWriter.html" title="struct iroh_blobs::provider::ResponseWriter">ResponseWriter</a></div><div class="desc docblock-short">A helper struct that combines a quinn::SendStream with auxiliary information</div></li><li><div class="item-name"><a class="struct" href="struct.TransferStats.html" title="struct iroh_blobs::provider::TransferStats">TransferStats</a></div><div class="desc docblock-short">The stats for a transfer of a collection or blob.</div></li></ul><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="enum" href="enum.AddProgress.html" title="enum iroh_blobs::provider::AddProgress">AddProgress</a></div><div class="desc docblock-short">Progress updates for the add operation.</div></li><li><div class="item-name"><a class="enum" href="enum.Event.html" title="enum iroh_blobs::provider::Event">Event</a></div><div class="desc docblock-short">Events emitted by the provider informing about the current status.</div></li><li><div class="item-name"><a class="enum" href="enum.SentStatus.html" title="enum iroh_blobs::provider::SentStatus">SentStatus</a></div><div class="desc docblock-short">Status of a send operation</div></li></ul><h2 id="traits" class="section-header">Traits<a href="#traits" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="trait" href="trait.EventSenderPlugin.html" title="trait iroh_blobs::provider::EventSenderPlugin">EventSenderPlugin</a></div><div class="desc docblock-short">Trait for sending events.</div></li></ul><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="fn" href="fn.handle_connection.html" title="fn iroh_blobs::provider::handle_connection">handle_connection</a></div><div class="desc docblock-short">Handle a single connection.</div></li><li><div class="item-name"><a class="fn" href="fn.handle_get.html" title="fn iroh_blobs::provider::handle_get">handle_get</a></div><div class="desc docblock-short">Handle a single standard get request.</div></li><li><div class="item-name"><a class="fn" href="fn.read_request.html" title="fn iroh_blobs::provider::read_request">read_request</a></div><div class="desc docblock-short">Read the request from the getter.</div></li><li><div class="item-name"><a class="fn" href="fn.send_blob.html" title="fn iroh_blobs::provider::send_blob">send_blob</a></div><div class="desc docblock-short">Send a blob to the client.</div></li><li><div class="item-name"><a class="fn" href="fn.transfer_collection.html" title="fn iroh_blobs::provider::transfer_collection">transfer_collection</a></div><div class="desc docblock-short">Transfers the collection & blob data.</div></li></ul></section></div></main></body></html>
|
||||
<!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="The server side API"><title>iroh_blobs::provider - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-b21aa549bf6d91ff.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="iroh_blobs" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (c987ad527 2024-05-01)" data-channel="nightly" data-search-js="search-bf21c90c8c1d92b1.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-e32f0c247825364d.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-09095024cf37855e.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh_blobs/index.html">iroh_blobs</a><span class="version">0.22.0</span></h2></div><h2 class="location"><a href="#">Module provider</a></h2><div class="sidebar-elems"><section><ul class="block"><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#traits">Traits</a></li><li><a href="#functions">Functions</a></li></ul></section><h2><a href="../index.html">In crate iroh_blobs</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../iroh_blobs/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Type ‘S’ or ‘/’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings">Settings</a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Module <a href="../index.html">iroh_blobs</a>::<wbr><a class="mod" href="#">provider</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../src/iroh_blobs/provider.rs.html#1-601">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The server side API</p>
|
||||
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.EventSender.html" title="struct iroh_blobs::provider::EventSender">EventSender</a></div></li><li><div class="item-name"><a class="struct" href="struct.ResponseWriter.html" title="struct iroh_blobs::provider::ResponseWriter">ResponseWriter</a></div><div class="desc docblock-short">A helper struct that combines a quinn::SendStream with auxiliary information</div></li><li><div class="item-name"><a class="struct" href="struct.TransferStats.html" title="struct iroh_blobs::provider::TransferStats">TransferStats</a></div><div class="desc docblock-short">The stats for a transfer of a collection or blob.</div></li></ul><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="enum" href="enum.AddProgress.html" title="enum iroh_blobs::provider::AddProgress">AddProgress</a></div><div class="desc docblock-short">Progress updates for the add operation.</div></li><li><div class="item-name"><a class="enum" href="enum.Event.html" title="enum iroh_blobs::provider::Event">Event</a></div><div class="desc docblock-short">Events emitted by the provider informing about the current status.</div></li><li><div class="item-name"><a class="enum" href="enum.SentStatus.html" title="enum iroh_blobs::provider::SentStatus">SentStatus</a></div><div class="desc docblock-short">Status of a send operation</div></li></ul><h2 id="traits" class="section-header">Traits<a href="#traits" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="trait" href="trait.CustomEventSender.html" title="trait iroh_blobs::provider::CustomEventSender">CustomEventSender</a></div><div class="desc docblock-short">Trait for sending events.</div></li></ul><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="fn" href="fn.handle_connection.html" title="fn iroh_blobs::provider::handle_connection">handle_connection</a></div><div class="desc docblock-short">Handle a single connection.</div></li><li><div class="item-name"><a class="fn" href="fn.handle_get.html" title="fn iroh_blobs::provider::handle_get">handle_get</a></div><div class="desc docblock-short">Handle a single standard get request.</div></li><li><div class="item-name"><a class="fn" href="fn.read_request.html" title="fn iroh_blobs::provider::read_request">read_request</a></div><div class="desc docblock-short">Read the request from the getter.</div></li><li><div class="item-name"><a class="fn" href="fn.send_blob.html" title="fn iroh_blobs::provider::send_blob">send_blob</a></div><div class="desc docblock-short">Send a blob to the client.</div></li><li><div class="item-name"><a class="fn" href="fn.transfer_collection.html" title="fn iroh_blobs::provider::transfer_collection">transfer_collection</a></div><div class="desc docblock-short">Transfers the collection & blob data.</div></li></ul></section></div></main></body></html>
|
||||
@@ -1 +1 @@
|
||||
window.SIDEBAR_ITEMS = {"enum":["AddProgress","Event","SentStatus"],"fn":["handle_connection","handle_get","read_request","send_blob","transfer_collection"],"struct":["EventSender","ResponseWriter","TransferStats"],"trait":["EventSenderPlugin"]};
|
||||
window.SIDEBAR_ITEMS = {"enum":["AddProgress","Event","SentStatus"],"fn":["handle_connection","handle_get","read_request","send_blob","transfer_collection"],"struct":["EventSender","ResponseWriter","TransferStats"],"trait":["CustomEventSender"]};
|
||||
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
+3
-3
@@ -1,6 +1,6 @@
|
||||
<!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="Trait for sending events."><title>EventSenderPlugin in iroh_blobs::provider - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-b21aa549bf6d91ff.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="iroh_blobs" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (c987ad527 2024-05-01)" data-channel="nightly" data-search-js="search-bf21c90c8c1d92b1.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-e32f0c247825364d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-09095024cf37855e.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.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]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh_blobs/index.html">iroh_blobs</a><span class="version">0.22.0</span></h2></div><h2 class="location"><a href="#">EventSenderPlugin</a></h2><div class="sidebar-elems"><section><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.send">send</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><h2><a href="index.html">In iroh_blobs::provider</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../iroh_blobs/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Type ‘S’ or ‘/’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings">Settings</a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Trait <a href="../index.html">iroh_blobs</a>::<wbr><a href="index.html">provider</a>::<wbr><a class="trait" href="#">EventSenderPlugin</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../src/iroh_blobs/provider.rs.html#278-281">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub trait EventSenderPlugin: <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.Sync.html" title="trait core::marker::Sync">Sync</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'static {
|
||||
<!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="Trait for sending events."><title>CustomEventSender in iroh_blobs::provider - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-b21aa549bf6d91ff.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="iroh_blobs" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (c987ad527 2024-05-01)" data-channel="nightly" data-search-js="search-bf21c90c8c1d92b1.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-e32f0c247825364d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-09095024cf37855e.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.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]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh_blobs/index.html">iroh_blobs</a><span class="version">0.22.0</span></h2></div><h2 class="location"><a href="#">CustomEventSender</a></h2><div class="sidebar-elems"><section><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.send">send</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><h2><a href="index.html">In iroh_blobs::provider</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../iroh_blobs/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Type ‘S’ or ‘/’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings">Settings</a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Trait <a href="../index.html">iroh_blobs</a>::<wbr><a href="index.html">provider</a>::<wbr><a class="trait" href="#">CustomEventSender</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../src/iroh_blobs/provider.rs.html#316-319">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub trait CustomEventSender: <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.Sync.html" title="trait core::marker::Sync">Sync</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'static {
|
||||
// Required method
|
||||
fn <a href="#tymethod.send" class="fn">send</a>(&self, event: <a class="enum" href="enum.Event.html" title="enum iroh_blobs::provider::Event">Event</a>) -> BoxFuture<<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>>;
|
||||
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Trait for sending events.</p>
|
||||
</div></details><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.send" class="method"><a class="src rightside" href="../../src/iroh_blobs/provider.rs.html#280">source</a><h4 class="code-header">fn <a href="#tymethod.send" class="fn">send</a>(&self, event: <a class="enum" href="enum.Event.html" title="enum iroh_blobs::provider::Event">Event</a>) -> BoxFuture<<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>></h4></section></summary><div class="docblock"><p>Send an event.</p>
|
||||
</div></details></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"></div><script src="../../trait.impl/iroh_blobs/provider/trait.EventSenderPlugin.js" async></script></section></div></main></body></html>
|
||||
</div></details><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.send" class="method"><a class="src rightside" href="../../src/iroh_blobs/provider.rs.html#318">source</a><h4 class="code-header">fn <a href="#tymethod.send" class="fn">send</a>(&self, event: <a class="enum" href="enum.Event.html" title="enum iroh_blobs::provider::Event">Event</a>) -> BoxFuture<<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>></h4></section></summary><div class="docblock"><p>Send an event.</p>
|
||||
</div></details></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"></div><script src="../../trait.impl/iroh_blobs/provider/trait.CustomEventSender.js" async></script></section></div></main></body></html>
|
||||
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,3 +1,2 @@
|
||||
<!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="Networking for the `iroh-gossip` protocol"><title>iroh_gossip::net - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-b21aa549bf6d91ff.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="iroh_gossip" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (c987ad527 2024-05-01)" data-channel="nightly" data-search-js="search-bf21c90c8c1d92b1.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-e32f0c247825364d.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-09095024cf37855e.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh_gossip/index.html">iroh_gossip</a><span class="version">0.22.0</span></h2></div><h2 class="location"><a href="#">Module net</a></h2><div class="sidebar-elems"><section><ul class="block"><li><a href="#modules">Modules</a></li><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#constants">Constants</a></li><li><a href="#types">Type Aliases</a></li></ul></section><h2><a href="../index.html">In crate iroh_gossip</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../iroh_gossip/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Type ‘S’ or ‘/’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings">Settings</a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Module <a href="../index.html">iroh_gossip</a>::<wbr><a class="mod" href="#">net</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../src/iroh_gossip/net.rs.html#1-997">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Networking for the <code>iroh-gossip</code> protocol</p>
|
||||
</div></details><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="mod" href="util/index.html" title="mod iroh_gossip::net::util">util</a></div><div class="desc docblock-short">Utilities for iroh-gossip networking</div></li></ul><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.Gossip.html" title="struct iroh_gossip::net::Gossip">Gossip</a></div><div class="desc docblock-short">Publish and subscribe on gossiping topics.</div></li><li><div class="item-name"><a class="struct" href="struct.GossipReceiver.html" title="struct iroh_gossip::net::GossipReceiver">GossipReceiver</a></div><div class="desc docblock-short">Receiver for gossip events on a topic.</div></li><li><div class="item-name"><a class="struct" href="struct.GossipSender.html" title="struct iroh_gossip::net::GossipSender">GossipSender</a></div><div class="desc docblock-short">Sender for a gossip topic.</div></li><li><div class="item-name"><a class="struct" href="struct.GossipTopic.html" title="struct iroh_gossip::net::GossipTopic">GossipTopic</a></div><div class="desc docblock-short">Subscribed gossip topic.</div></li><li><div class="item-name"><a class="struct" href="struct.JoinOptions.html" title="struct iroh_gossip::net::JoinOptions">JoinOptions</a></div><div class="desc docblock-short">Options for joining a gossip topic.</div></li><li><div class="item-name"><a class="struct" href="struct.Message.html" title="struct iroh_gossip::net::Message">Message</a></div><div class="desc docblock-short">A gossip message</div></li></ul><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="enum" href="enum.Command.html" title="enum iroh_gossip::net::Command">Command</a></div><div class="desc docblock-short">Send a gossip message</div></li><li><div class="item-name"><a class="enum" href="enum.Event.html" title="enum iroh_gossip::net::Event">Event</a></div><div class="desc docblock-short">Update from a subscribed gossip topic.</div></li><li><div class="item-name"><a class="enum" href="enum.GossipEvent.html" title="enum iroh_gossip::net::GossipEvent">GossipEvent</a></div><div class="desc docblock-short">Gossip event
|
||||
An event to be emitted to the application for a particular topic.</div></li></ul><h2 id="constants" class="section-header">Constants<a href="#constants" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="constant" href="constant.GOSSIP_ALPN.html" title="constant iroh_gossip::net::GOSSIP_ALPN">GOSSIP_ALPN</a></div><div class="desc docblock-short">ALPN protocol name</div></li></ul><h2 id="types" class="section-header">Type Aliases<a href="#types" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="type" href="type.CommandStream.html" title="type iroh_gossip::net::CommandStream">CommandStream</a></div><div class="desc docblock-short">A stream of commands for a gossip subscription.</div></li><li><div class="item-name"><a class="type" href="type.ProtoCommand.html" title="type iroh_gossip::net::ProtoCommand">ProtoCommand</a></div><div class="desc docblock-short">Commands for the gossip protocol</div></li><li><div class="item-name"><a class="type" href="type.ProtoEvent.html" title="type iroh_gossip::net::ProtoEvent">ProtoEvent</a></div><div class="desc docblock-short">Events emitted from the gossip protocol</div></li></ul></section></div></main></body></html>
|
||||
<!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="Networking for the `iroh-gossip` protocol"><title>iroh_gossip::net - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-b21aa549bf6d91ff.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="iroh_gossip" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (c987ad527 2024-05-01)" data-channel="nightly" data-search-js="search-bf21c90c8c1d92b1.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-e32f0c247825364d.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-09095024cf37855e.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh_gossip/index.html">iroh_gossip</a><span class="version">0.22.0</span></h2></div><h2 class="location"><a href="#">Module net</a></h2><div class="sidebar-elems"><section><ul class="block"><li><a href="#modules">Modules</a></li><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#constants">Constants</a></li><li><a href="#types">Type Aliases</a></li></ul></section><h2><a href="../index.html">In crate iroh_gossip</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../iroh_gossip/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Type ‘S’ or ‘/’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings">Settings</a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Module <a href="../index.html">iroh_gossip</a>::<wbr><a class="mod" href="#">net</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../src/iroh_gossip/net.rs.html#1-1000">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Networking for the <code>iroh-gossip</code> protocol</p>
|
||||
</div></details><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="mod" href="util/index.html" title="mod iroh_gossip::net::util">util</a></div><div class="desc docblock-short">Utilities for iroh-gossip networking</div></li></ul><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.Gossip.html" title="struct iroh_gossip::net::Gossip">Gossip</a></div><div class="desc docblock-short">Publish and subscribe on gossiping topics.</div></li><li><div class="item-name"><a class="struct" href="struct.GossipReceiver.html" title="struct iroh_gossip::net::GossipReceiver">GossipReceiver</a></div><div class="desc docblock-short">Receiver for gossip events on a topic.</div></li><li><div class="item-name"><a class="struct" href="struct.GossipSender.html" title="struct iroh_gossip::net::GossipSender">GossipSender</a></div><div class="desc docblock-short">Sender for a gossip topic.</div></li><li><div class="item-name"><a class="struct" href="struct.GossipTopic.html" title="struct iroh_gossip::net::GossipTopic">GossipTopic</a></div><div class="desc docblock-short">Subscribed gossip topic.</div></li><li><div class="item-name"><a class="struct" href="struct.JoinOptions.html" title="struct iroh_gossip::net::JoinOptions">JoinOptions</a></div><div class="desc docblock-short">Options for joining a gossip topic.</div></li><li><div class="item-name"><a class="struct" href="struct.Message.html" title="struct iroh_gossip::net::Message">Message</a></div><div class="desc docblock-short">A gossip message</div></li></ul><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="enum" href="enum.Command.html" title="enum iroh_gossip::net::Command">Command</a></div><div class="desc docblock-short">Send a gossip message</div></li><li><div class="item-name"><a class="enum" href="enum.Event.html" title="enum iroh_gossip::net::Event">Event</a></div><div class="desc docblock-short">Events emitted from a gossip topic with a lagging notification.</div></li><li><div class="item-name"><a class="enum" href="enum.GossipEvent.html" title="enum iroh_gossip::net::GossipEvent">GossipEvent</a></div><div class="desc docblock-short">Events emitted from a gossip topic.</div></li></ul><h2 id="constants" class="section-header">Constants<a href="#constants" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="constant" href="constant.GOSSIP_ALPN.html" title="constant iroh_gossip::net::GOSSIP_ALPN">GOSSIP_ALPN</a></div><div class="desc docblock-short">ALPN protocol name</div></li></ul><h2 id="types" class="section-header">Type Aliases<a href="#types" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="type" href="type.CommandStream.html" title="type iroh_gossip::net::CommandStream">CommandStream</a></div><div class="desc docblock-short">A stream of commands for a gossip subscription.</div></li><li><div class="item-name"><a class="type" href="type.ProtoCommand.html" title="type iroh_gossip::net::ProtoCommand">ProtoCommand</a></div><div class="desc docblock-short">Commands for the gossip protocol</div></li><li><div class="item-name"><a class="type" href="type.ProtoEvent.html" title="type iroh_gossip::net::ProtoEvent">ProtoEvent</a></div><div class="desc docblock-short">Events emitted from the gossip protocol</div></li></ul></section></div></main></body></html>
|
||||
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,2 +1,2 @@
|
||||
<!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="A stream of commands for a gossip subscription."><title>CommandStream in iroh_gossip::net - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-b21aa549bf6d91ff.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="iroh_gossip" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (c987ad527 2024-05-01)" data-channel="nightly" data-search-js="search-bf21c90c8c1d92b1.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-e32f0c247825364d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-09095024cf37855e.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc type"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh_gossip/index.html">iroh_gossip</a><span class="version">0.22.0</span></h2></div><h2 class="location"><a href="#">CommandStream</a></h2><div class="sidebar-elems"><section><h3><a href="#aliased-type">Aliased type</a></h3></section><h2><a href="index.html">In iroh_gossip::net</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../iroh_gossip/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Type ‘S’ or ‘/’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings">Settings</a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Type Alias <a href="../index.html">iroh_gossip</a>::<wbr><a href="index.html">net</a>::<wbr><a class="type" href="#">CommandStream</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../src/iroh_gossip/net/handles.rs.html#217">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub type CommandStream = <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn Stream<Item = <a class="enum" href="enum.Command.html" title="enum iroh_gossip::net::Command">Command</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> + 'static>>;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A stream of commands for a gossip subscription.</p>
|
||||
<!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="A stream of commands for a gossip subscription."><title>CommandStream in iroh_gossip::net - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-b21aa549bf6d91ff.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="iroh_gossip" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (c987ad527 2024-05-01)" data-channel="nightly" data-search-js="search-bf21c90c8c1d92b1.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-e32f0c247825364d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-09095024cf37855e.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc type"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh_gossip/index.html">iroh_gossip</a><span class="version">0.22.0</span></h2></div><h2 class="location"><a href="#">CommandStream</a></h2><div class="sidebar-elems"><section><h3><a href="#aliased-type">Aliased type</a></h3></section><h2><a href="index.html">In iroh_gossip::net</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../iroh_gossip/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Type ‘S’ or ‘/’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings">Settings</a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Type Alias <a href="../index.html">iroh_gossip</a>::<wbr><a href="index.html">net</a>::<wbr><a class="type" href="#">CommandStream</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../src/iroh_gossip/net/handles.rs.html#239">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub type CommandStream = <a class="struct" href="https://doc.rust-lang.org/nightly/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn Stream<Item = <a class="enum" href="enum.Command.html" title="enum iroh_gossip::net::Command">Command</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> + 'static>>;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A stream of commands for a gossip subscription.</p>
|
||||
</div></details><h2 id="aliased-type" class="section-header">Aliased Type<a href="#aliased-type" class="anchor">§</a></h2><pre class="rust item-decl"><code>struct CommandStream { <span class="comment">/* private fields */</span> }</code></pre><script src="../../type.impl/core/pin/struct.Pin.js" data-self-path="iroh_gossip::net::handles::CommandStream" async></script></section></div></main></body></html>
|
||||
@@ -8,7 +8,7 @@
|
||||
</div><section id="variant.Received" class="variant"><a href="#variant.Received" class="anchor">§</a><h3 class="code-header">Received(GossipEvent<PI>)</h3></section><div class="docblock"><p>A gossip message was received for this topic</p>
|
||||
</div></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-Event%3CPI%3E" class="impl"><a class="src rightside" href="../../../src/iroh_gossip/proto/topic.rs.html#119">source</a><a href="#impl-Clone-for-Event%3CPI%3E" class="anchor">§</a><h3 class="code-header">impl<PI: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="enum.Event.html" title="enum iroh_gossip::proto::topic::Event">Event</a><PI></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="src rightside" href="../../../src/iroh_gossip/proto/topic.rs.html#119">source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&self) -> <a class="enum" href="enum.Event.html" title="enum iroh_gossip::proto::topic::Event">Event</a><PI></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#169">source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&Self</a>)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-Event%3CPI%3E" class="impl"><a class="src rightside" href="../../../src/iroh_gossip/proto/topic.rs.html#119">source</a><a href="#impl-Debug-for-Event%3CPI%3E" class="anchor">§</a><h3 class="code-header">impl<PI: <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/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="enum.Event.html" title="enum iroh_gossip::proto::topic::Event">Event</a><PI></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../../src/iroh_gossip/proto/topic.rs.html#119">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Deserialize%3C'de%3E-for-Event%3CPI%3E" class="impl"><a class="src rightside" href="../../../src/iroh_gossip/proto/topic.rs.html#119">source</a><a href="#impl-Deserialize%3C'de%3E-for-Event%3CPI%3E" class="anchor">§</a><h3 class="code-header">impl<'de, PI> <a class="trait" href="https://docs.rs/serde/1.0.204/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a><'de> for <a class="enum" href="enum.Event.html" title="enum iroh_gossip::proto::topic::Event">Event</a><PI><div class="where">where
|
||||
PI: <a class="trait" href="https://docs.rs/serde/1.0.204/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a><'de>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.deserialize" class="method trait-impl"><a class="src rightside" href="../../../src/iroh_gossip/proto/topic.rs.html#119">source</a><a href="#method.deserialize" class="anchor">§</a><h4 class="code-header">fn <a href="https://docs.rs/serde/1.0.204/serde/de/trait.Deserialize.html#tymethod.deserialize" class="fn">deserialize</a><__D>(__deserializer: __D) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, __D::<a class="associatedtype" href="https://docs.rs/serde/1.0.204/serde/de/trait.Deserializer.html#associatedtype.Error" title="type serde::de::Deserializer::Error">Error</a>><div class="where">where
|
||||
__D: <a class="trait" href="https://docs.rs/serde/1.0.204/serde/de/trait.Deserializer.html" title="trait serde::de::Deserializer">Deserializer</a><'de>,</div></h4></section></summary><div class='docblock'>Deserialize this value from the given Serde deserializer. <a href="https://docs.rs/serde/1.0.204/serde/de/trait.Deserialize.html#tymethod.deserialize">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CEvent%3CPublicKey%3E%3E-for-GossipEvent" class="impl"><a class="src rightside" href="../../../src/iroh_gossip/net/handles.rs.html#189-201">source</a><a href="#impl-From%3CEvent%3CPublicKey%3E%3E-for-GossipEvent" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="enum" href="enum.Event.html" title="enum iroh_gossip::proto::topic::Event">Event</a><<a class="struct" href="../../../iroh_base/key/struct.PublicKey.html" title="struct iroh_base::key::PublicKey">PublicKey</a>>> for <a class="enum" href="../../net/enum.GossipEvent.html" title="enum iroh_gossip::net::GossipEvent">GossipEvent</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="../../../src/iroh_gossip/net/handles.rs.html#190-200">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(event: <a class="enum" href="enum.Event.html" title="enum iroh_gossip::proto::topic::Event">Event</a><<a class="type" href="../../../iroh_base/key/type.NodeId.html" title="type iroh_base::key::NodeId">NodeId</a>>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Ord-for-Event%3CPI%3E" class="impl"><a class="src rightside" href="../../../src/iroh_gossip/proto/topic.rs.html#119">source</a><a href="#impl-Ord-for-Event%3CPI%3E" class="anchor">§</a><h3 class="code-header">impl<PI: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> for <a class="enum" href="enum.Event.html" title="enum iroh_gossip::proto::topic::Event">Event</a><PI></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.cmp" class="method trait-impl"><a class="src rightside" href="../../../src/iroh_gossip/proto/topic.rs.html#119">source</a><a href="#method.cmp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#tymethod.cmp" class="fn">cmp</a>(&self, other: &<a class="enum" href="enum.Event.html" title="enum iroh_gossip::proto::topic::Event">Event</a><PI>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a></h4></section></summary><div class='docblock'>This method returns an <a href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering"><code>Ordering</code></a> between <code>self</code> and <code>other</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#tymethod.cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.max" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="src" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#856-858">source</a></span><a href="#method.max" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.max" class="fn">max</a>(self, other: Self) -> Self<div class="where">where
|
||||
__D: <a class="trait" href="https://docs.rs/serde/1.0.204/serde/de/trait.Deserializer.html" title="trait serde::de::Deserializer">Deserializer</a><'de>,</div></h4></section></summary><div class='docblock'>Deserialize this value from the given Serde deserializer. <a href="https://docs.rs/serde/1.0.204/serde/de/trait.Deserialize.html#tymethod.deserialize">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CEvent%3CPublicKey%3E%3E-for-GossipEvent" class="impl"><a class="src rightside" href="../../../src/iroh_gossip/net/handles.rs.html#211-223">source</a><a href="#impl-From%3CEvent%3CPublicKey%3E%3E-for-GossipEvent" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="enum" href="enum.Event.html" title="enum iroh_gossip::proto::topic::Event">Event</a><<a class="struct" href="../../../iroh_base/key/struct.PublicKey.html" title="struct iroh_base::key::PublicKey">PublicKey</a>>> for <a class="enum" href="../../net/enum.GossipEvent.html" title="enum iroh_gossip::net::GossipEvent">GossipEvent</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="../../../src/iroh_gossip/net/handles.rs.html#212-222">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(event: <a class="enum" href="enum.Event.html" title="enum iroh_gossip::proto::topic::Event">Event</a><<a class="type" href="../../../iroh_base/key/type.NodeId.html" title="type iroh_base::key::NodeId">NodeId</a>>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Ord-for-Event%3CPI%3E" class="impl"><a class="src rightside" href="../../../src/iroh_gossip/proto/topic.rs.html#119">source</a><a href="#impl-Ord-for-Event%3CPI%3E" class="anchor">§</a><h3 class="code-header">impl<PI: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> for <a class="enum" href="enum.Event.html" title="enum iroh_gossip::proto::topic::Event">Event</a><PI></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.cmp" class="method trait-impl"><a class="src rightside" href="../../../src/iroh_gossip/proto/topic.rs.html#119">source</a><a href="#method.cmp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#tymethod.cmp" class="fn">cmp</a>(&self, other: &<a class="enum" href="enum.Event.html" title="enum iroh_gossip::proto::topic::Event">Event</a><PI>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a></h4></section></summary><div class='docblock'>This method returns an <a href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering"><code>Ordering</code></a> between <code>self</code> and <code>other</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#tymethod.cmp">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.max" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="src" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#856-858">source</a></span><a href="#method.max" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.max" class="fn">max</a>(self, other: Self) -> Self<div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Compares and returns the maximum of two values. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.max">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.min" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="src" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#877-879">source</a></span><a href="#method.min" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.min" class="fn">min</a>(self, other: Self) -> Self<div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Compares and returns the minimum of two values. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.min">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clamp" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.50.0">1.50.0</span> · <a class="src" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#902-905">source</a></span><a href="#method.clamp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.clamp" class="fn">clamp</a>(self, min: Self, max: Self) -> Self<div class="where">where
|
||||
Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>,</div></h4></section></summary><div class='docblock'>Restrict a value to a certain interval. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.clamp">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq-for-Event%3CPI%3E" class="impl"><a class="src rightside" href="../../../src/iroh_gossip/proto/topic.rs.html#119">source</a><a href="#impl-PartialEq-for-Event%3CPI%3E" class="anchor">§</a><h3 class="code-header">impl<PI: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a> for <a class="enum" href="enum.Event.html" title="enum iroh_gossip::proto::topic::Event">Event</a><PI></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl"><a class="src rightside" href="../../../src/iroh_gossip/proto/topic.rs.html#119">source</a><a href="#method.eq" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="enum" href="enum.Event.html" title="enum iroh_gossip::proto::topic::Event">Event</a><PI>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
|
||||
|
||||
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
File diff suppressed because one or more lines are too long
@@ -1513,6 +1513,10 @@
|
||||
<a href="#1513" id="1513">1513</a>
|
||||
<a href="#1514" id="1514">1514</a>
|
||||
<a href="#1515" id="1515">1515</a>
|
||||
<a href="#1516" id="1516">1516</a>
|
||||
<a href="#1517" id="1517">1517</a>
|
||||
<a href="#1518" id="1518">1518</a>
|
||||
<a href="#1519" id="1519">1519</a>
|
||||
</pre></div><pre class="rust"><code><span class="doccomment">//! API for blobs management.
|
||||
//!
|
||||
//! The main entry point is the [`Client`].
|
||||
@@ -2459,7 +2463,7 @@
|
||||
<span class="kw">use super</span>::<span class="kw-2">*</span>;
|
||||
|
||||
<span class="kw">use </span>anyhow::Context <span class="kw">as _</span>;
|
||||
<span class="kw">use </span>iroh_blobs::{hashseq::HashSeq, provider::EventSender};
|
||||
<span class="kw">use </span>iroh_blobs::hashseq::HashSeq;
|
||||
<span class="kw">use </span>iroh_net::NodeId;
|
||||
<span class="kw">use </span>rand::RngCore;
|
||||
<span class="kw">use </span>testresult::TestResult;
|
||||
@@ -2772,13 +2776,13 @@
|
||||
sender: mpsc::Sender<iroh_blobs::provider::Event>,
|
||||
}
|
||||
<span class="kw">impl </span>BlobEvents {
|
||||
<span class="kw">fn </span>new(cap: usize) -> (EventSender, mpsc::Receiver<iroh_blobs::provider::Event>) {
|
||||
<span class="kw">fn </span>new(cap: usize) -> (<span class="self">Self</span>, mpsc::Receiver<iroh_blobs::provider::Event>) {
|
||||
<span class="kw">let </span>(s, r) = mpsc::channel(cap);
|
||||
(EventSender::new(<span class="prelude-val">Some</span>(Arc::new(<span class="self">Self </span>{ sender: s }))), r)
|
||||
(<span class="self">Self </span>{ sender: s }, r)
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">impl </span>iroh_blobs::provider::EventSenderPlugin <span class="kw">for </span>BlobEvents {
|
||||
<span class="kw">impl </span>iroh_blobs::provider::CustomEventSender <span class="kw">for </span>BlobEvents {
|
||||
<span class="kw">fn </span>send(<span class="kw-2">&</span><span class="self">self</span>, event: iroh_blobs::provider::Event) -> futures_lite::future::Boxed<()> {
|
||||
<span class="kw">let </span>sender = <span class="self">self</span>.sender.clone();
|
||||
Box::pin(<span class="kw">async move </span>{
|
||||
@@ -2823,8 +2827,8 @@
|
||||
<span class="kw">while let </span><span class="prelude-val">Some</span>(ev) = node1_events_r.recv().<span class="kw">await </span>{
|
||||
ev1.push(ev);
|
||||
}
|
||||
<span class="macro">assert_eq!</span>(ev1.len(), <span class="number">3</span>);
|
||||
<span class="macro">assert!</span>(<span class="macro">matches!</span>(
|
||||
<span class="comment">// assert_eq!(ev1.len(), 3);
|
||||
</span><span class="macro">assert!</span>(<span class="macro">matches!</span>(
|
||||
ev1[<span class="number">0</span>],
|
||||
iroh_blobs::provider::Event::ClientConnected { .. }
|
||||
));
|
||||
@@ -2834,6 +2838,10 @@
|
||||
));
|
||||
<span class="macro">assert!</span>(<span class="macro">matches!</span>(
|
||||
ev1[<span class="number">2</span>],
|
||||
iroh_blobs::provider::Event::TransferProgress { .. }
|
||||
));
|
||||
<span class="macro">assert!</span>(<span class="macro">matches!</span>(
|
||||
ev1[<span class="number">3</span>],
|
||||
iroh_blobs::provider::Event::TransferCompleted { .. }
|
||||
));
|
||||
<span class="macro">dbg!</span>(<span class="kw-2">&</span>ev1);
|
||||
|
||||
@@ -915,27 +915,6 @@
|
||||
<a href="#915" id="915">915</a>
|
||||
<a href="#916" id="916">916</a>
|
||||
<a href="#917" id="917">917</a>
|
||||
<a href="#918" id="918">918</a>
|
||||
<a href="#919" id="919">919</a>
|
||||
<a href="#920" id="920">920</a>
|
||||
<a href="#921" id="921">921</a>
|
||||
<a href="#922" id="922">922</a>
|
||||
<a href="#923" id="923">923</a>
|
||||
<a href="#924" id="924">924</a>
|
||||
<a href="#925" id="925">925</a>
|
||||
<a href="#926" id="926">926</a>
|
||||
<a href="#927" id="927">927</a>
|
||||
<a href="#928" id="928">928</a>
|
||||
<a href="#929" id="929">929</a>
|
||||
<a href="#930" id="930">930</a>
|
||||
<a href="#931" id="931">931</a>
|
||||
<a href="#932" id="932">932</a>
|
||||
<a href="#933" id="933">933</a>
|
||||
<a href="#934" id="934">934</a>
|
||||
<a href="#935" id="935">935</a>
|
||||
<a href="#936" id="936">936</a>
|
||||
<a href="#937" id="937">937</a>
|
||||
<a href="#938" id="938">938</a>
|
||||
</pre></div><pre class="rust"><code><span class="kw">use </span>std::{
|
||||
net::{Ipv4Addr, SocketAddr, SocketAddrV4},
|
||||
path::{Path, PathBuf},
|
||||
@@ -1221,32 +1200,11 @@
|
||||
</span>D: BaoStore,
|
||||
{
|
||||
<span class="doccomment">/// Set the blobs event sender.
|
||||
</span><span class="kw">pub fn </span>set_blobs_events(<span class="self">self</span>, blob_events: EventSender) -> Builder<D> {
|
||||
Builder {
|
||||
storage: <span class="self">self</span>.storage,
|
||||
bind_port: <span class="self">self</span>.bind_port,
|
||||
secret_key: <span class="self">self</span>.secret_key,
|
||||
blobs_store: <span class="self">self</span>.blobs_store,
|
||||
keylog: <span class="self">self</span>.keylog,
|
||||
rpc_endpoint: <span class="self">self</span>.rpc_endpoint,
|
||||
rpc_addr: <span class="self">self</span>.rpc_addr,
|
||||
relay_mode: <span class="self">self</span>.relay_mode,
|
||||
dns_resolver: <span class="self">self</span>.dns_resolver,
|
||||
gc_policy: <span class="self">self</span>.gc_policy,
|
||||
docs_storage: <span class="self">self</span>.docs_storage,
|
||||
node_discovery: <span class="self">self</span>.node_discovery,
|
||||
<span class="attr">#[cfg(any(test, feature = <span class="string">"test-utils"</span>))]
|
||||
</span>insecure_skip_relay_cert_verify: <span class="bool-val">false</span>,
|
||||
gc_done_callback: <span class="self">self</span>.gc_done_callback,
|
||||
blob_events,
|
||||
}
|
||||
}
|
||||
}
|
||||
</span><span class="kw">pub fn </span>set_blobs_events(<span class="kw-2">mut </span><span class="self">self</span>, blob_events: <span class="kw">impl </span>Into<EventSender>) -> <span class="self">Self </span>{
|
||||
<span class="self">self</span>.blob_events = blob_events.into();
|
||||
<span class="self">self
|
||||
</span>}
|
||||
|
||||
<span class="kw">impl</span><D> Builder<D>
|
||||
<span class="kw">where
|
||||
</span>D: BaoStore,
|
||||
{
|
||||
<span class="doccomment">/// Persist all node data in the provided directory.
|
||||
</span><span class="kw">pub async fn </span>persist(
|
||||
<span class="self">self</span>,
|
||||
|
||||
@@ -550,6 +550,55 @@
|
||||
<a href="#550" id="550">550</a>
|
||||
<a href="#551" id="551">551</a>
|
||||
<a href="#552" id="552">552</a>
|
||||
<a href="#553" id="553">553</a>
|
||||
<a href="#554" id="554">554</a>
|
||||
<a href="#555" id="555">555</a>
|
||||
<a href="#556" id="556">556</a>
|
||||
<a href="#557" id="557">557</a>
|
||||
<a href="#558" id="558">558</a>
|
||||
<a href="#559" id="559">559</a>
|
||||
<a href="#560" id="560">560</a>
|
||||
<a href="#561" id="561">561</a>
|
||||
<a href="#562" id="562">562</a>
|
||||
<a href="#563" id="563">563</a>
|
||||
<a href="#564" id="564">564</a>
|
||||
<a href="#565" id="565">565</a>
|
||||
<a href="#566" id="566">566</a>
|
||||
<a href="#567" id="567">567</a>
|
||||
<a href="#568" id="568">568</a>
|
||||
<a href="#569" id="569">569</a>
|
||||
<a href="#570" id="570">570</a>
|
||||
<a href="#571" id="571">571</a>
|
||||
<a href="#572" id="572">572</a>
|
||||
<a href="#573" id="573">573</a>
|
||||
<a href="#574" id="574">574</a>
|
||||
<a href="#575" id="575">575</a>
|
||||
<a href="#576" id="576">576</a>
|
||||
<a href="#577" id="577">577</a>
|
||||
<a href="#578" id="578">578</a>
|
||||
<a href="#579" id="579">579</a>
|
||||
<a href="#580" id="580">580</a>
|
||||
<a href="#581" id="581">581</a>
|
||||
<a href="#582" id="582">582</a>
|
||||
<a href="#583" id="583">583</a>
|
||||
<a href="#584" id="584">584</a>
|
||||
<a href="#585" id="585">585</a>
|
||||
<a href="#586" id="586">586</a>
|
||||
<a href="#587" id="587">587</a>
|
||||
<a href="#588" id="588">588</a>
|
||||
<a href="#589" id="589">589</a>
|
||||
<a href="#590" id="590">590</a>
|
||||
<a href="#591" id="591">591</a>
|
||||
<a href="#592" id="592">592</a>
|
||||
<a href="#593" id="593">593</a>
|
||||
<a href="#594" id="594">594</a>
|
||||
<a href="#595" id="595">595</a>
|
||||
<a href="#596" id="596">596</a>
|
||||
<a href="#597" id="597">597</a>
|
||||
<a href="#598" id="598">598</a>
|
||||
<a href="#599" id="599">599</a>
|
||||
<a href="#600" id="600">600</a>
|
||||
<a href="#601" id="601">601</a>
|
||||
</pre></div><pre class="rust"><code><span class="doccomment">//! The server side API
|
||||
</span><span class="kw">use </span>std::fmt::Debug;
|
||||
<span class="kw">use </span>std::sync::Arc;
|
||||
@@ -602,15 +651,6 @@
|
||||
<span class="doccomment">/// The hash for which the client wants to receive data.
|
||||
</span>hash: Hash,
|
||||
},
|
||||
<span class="doccomment">/// A request was received from a client.
|
||||
</span>CustomGetRequestReceived {
|
||||
<span class="doccomment">/// An unique connection id.
|
||||
</span>connection_id: u64,
|
||||
<span class="doccomment">/// An identifier uniquely identifying this transfer request.
|
||||
</span>request_id: u64,
|
||||
<span class="doccomment">/// The size of the custom get request.
|
||||
</span>len: usize,
|
||||
},
|
||||
<span class="doccomment">/// A sequence of hashes has been found and is being transferred.
|
||||
</span>TransferHashSeqStarted {
|
||||
<span class="doccomment">/// An unique connection id.
|
||||
@@ -620,6 +660,17 @@
|
||||
<span class="doccomment">/// The number of blobs in the sequence.
|
||||
</span>num_blobs: u64,
|
||||
},
|
||||
<span class="doccomment">/// A sequence of hashes has been found and is being transferred.
|
||||
</span>TransferProgress {
|
||||
<span class="doccomment">/// An unique connection id.
|
||||
</span>connection_id: u64,
|
||||
<span class="doccomment">/// An identifier uniquely identifying this transfer request.
|
||||
</span>request_id: u64,
|
||||
<span class="doccomment">/// The hash for which we are transferring data.
|
||||
</span>hash: Hash,
|
||||
<span class="doccomment">/// Offset
|
||||
</span>offset: u64,
|
||||
},
|
||||
<span class="doccomment">/// A blob in a sequence was transferred.
|
||||
</span>TransferBlobCompleted {
|
||||
<span class="doccomment">/// An unique connection id.
|
||||
@@ -744,6 +795,9 @@
|
||||
stats: <span class="kw-2">&mut </span>TransferStats,
|
||||
) -> <span class="prelude-ty">Result</span><SentStatus> {
|
||||
<span class="kw">let </span>hash = request.hash;
|
||||
<span class="kw">let </span>events = writer.events.clone();
|
||||
<span class="kw">let </span>request_id = writer.request_id();
|
||||
<span class="kw">let </span>connection_id = writer.connection_id();
|
||||
|
||||
<span class="comment">// if the request is just for the root, we don't need to deserialize the collection
|
||||
</span><span class="kw">let </span>just_root = <span class="macro">matches!</span>(request.ranges.as_single(), <span class="prelude-val">Some</span>((<span class="number">0</span>, <span class="kw">_</span>)));
|
||||
@@ -763,6 +817,13 @@
|
||||
<span class="prelude-val">None
|
||||
</span>};
|
||||
|
||||
<span class="kw">let </span>mk_progress = |offset| Event::TransferProgress {
|
||||
connection_id,
|
||||
request_id,
|
||||
hash,
|
||||
offset,
|
||||
};
|
||||
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>prev = <span class="number">0</span>;
|
||||
<span class="kw">for </span>(offset, ranges) <span class="kw">in </span>request.ranges.iter_non_empty() {
|
||||
<span class="comment">// create a tracking writer so we can get some stats for writing
|
||||
@@ -771,11 +832,13 @@
|
||||
<span class="macro">debug!</span>(<span class="string">"writing ranges '{:?}' of sequence {}"</span>, ranges, hash);
|
||||
<span class="comment">// wrap the data reader in a tracking reader so we can get some stats for reading
|
||||
</span><span class="kw">let </span><span class="kw-2">mut </span>tracking_reader = TrackingSliceReader::new(<span class="kw-2">&mut </span>data);
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>sending_reader =
|
||||
SendingSliceReader::new(<span class="kw-2">&mut </span>tracking_reader, events.clone(), mk_progress);
|
||||
<span class="comment">// send the root
|
||||
</span>tw.write(outboard.tree().size().to_le_bytes().as_slice())
|
||||
.<span class="kw">await</span><span class="question-mark">?</span>;
|
||||
encode_ranges_validated(
|
||||
<span class="kw-2">&mut </span>tracking_reader,
|
||||
<span class="kw-2">&mut </span>sending_reader,
|
||||
<span class="kw-2">&mut </span>outboard,
|
||||
<span class="kw-2">&</span>ranges.to_chunk_ranges(),
|
||||
<span class="kw-2">&mut </span>tw,
|
||||
@@ -796,7 +859,8 @@
|
||||
}
|
||||
<span class="kw">if let </span><span class="prelude-val">Some</span>(hash) = c.next().<span class="kw">await</span><span class="question-mark">? </span>{
|
||||
tokio::task::yield_now().<span class="kw">await</span>;
|
||||
<span class="kw">let </span>(status, size, blob_read_stats) = send_blob(db, hash, ranges, <span class="kw-2">&mut </span>tw).<span class="kw">await</span><span class="question-mark">?</span>;
|
||||
<span class="kw">let </span>(status, size, blob_read_stats) =
|
||||
send_blob(db, hash, ranges, <span class="kw-2">&mut </span>tw, events.clone(), mk_progress).<span class="kw">await</span><span class="question-mark">?</span>;
|
||||
stats.send += tw.stats();
|
||||
stats.read += blob_read_stats;
|
||||
<span class="kw">if </span>SentStatus::NotFound == status {
|
||||
@@ -826,8 +890,31 @@
|
||||
<span class="prelude-val">Ok</span>(SentStatus::Sent)
|
||||
}
|
||||
|
||||
<span class="kw">struct </span>SendingSliceReader<R, F> {
|
||||
inner: R,
|
||||
sender: EventSender,
|
||||
f: F,
|
||||
}
|
||||
|
||||
<span class="kw">impl</span><R: AsyncSliceReader, F: Fn(u64) -> Event> SendingSliceReader<R, F> {
|
||||
<span class="kw">fn </span>new(inner: R, sender: EventSender, f: F) -> <span class="self">Self </span>{
|
||||
<span class="self">Self </span>{ inner, sender, f }
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">impl</span><R: AsyncSliceReader, F: Fn(u64) -> Event> AsyncSliceReader <span class="kw">for </span>SendingSliceReader<R, F> {
|
||||
<span class="kw">async fn </span>read_at(<span class="kw-2">&mut </span><span class="self">self</span>, offset: u64, len: usize) -> std::io::Result<bytes::Bytes> {
|
||||
<span class="self">self</span>.sender.send(|| (<span class="self">self</span>.f)(offset)).<span class="kw">await</span>;
|
||||
<span class="self">self</span>.inner.read_at(offset, len).<span class="kw">await
|
||||
</span>}
|
||||
|
||||
<span class="kw">async fn </span>size(<span class="kw-2">&mut </span><span class="self">self</span>) -> std::io::Result<u64> {
|
||||
<span class="self">self</span>.inner.size().<span class="kw">await
|
||||
</span>}
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Trait for sending events.
|
||||
</span><span class="kw">pub trait </span>EventSenderPlugin: std::fmt::Debug + Sync + Send + <span class="lifetime">'static </span>{
|
||||
</span><span class="kw">pub trait </span>CustomEventSender: std::fmt::Debug + Sync + Send + <span class="lifetime">'static </span>{
|
||||
<span class="doccomment">/// Send an event.
|
||||
</span><span class="kw">fn </span>send(<span class="kw-2">&</span><span class="self">self</span>, event: Event) -> BoxFuture<()>;
|
||||
}
|
||||
@@ -835,12 +922,20 @@
|
||||
<span class="doccomment">///
|
||||
</span><span class="attr">#[derive(Debug, Clone, Default)]
|
||||
</span><span class="kw">pub struct </span>EventSender {
|
||||
inner: <span class="prelude-ty">Option</span><Arc<<span class="kw">dyn </span>EventSenderPlugin>>,
|
||||
inner: <span class="prelude-ty">Option</span><Arc<<span class="kw">dyn </span>CustomEventSender>>,
|
||||
}
|
||||
|
||||
<span class="kw">impl</span><T: CustomEventSender> From<T> <span class="kw">for </span>EventSender {
|
||||
<span class="kw">fn </span>from(inner: T) -> <span class="self">Self </span>{
|
||||
<span class="self">Self </span>{
|
||||
inner: <span class="prelude-val">Some</span>(Arc::new(inner)),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">impl </span>EventSender {
|
||||
<span class="doccomment">/// Create a new event sender.
|
||||
</span><span class="kw">pub fn </span>new(inner: <span class="prelude-ty">Option</span><Arc<<span class="kw">dyn </span>EventSenderPlugin>>) -> <span class="self">Self </span>{
|
||||
</span><span class="kw">pub fn </span>new(inner: <span class="prelude-ty">Option</span><Arc<<span class="kw">dyn </span>CustomEventSender>>) -> <span class="self">Self </span>{
|
||||
<span class="self">Self </span>{ inner }
|
||||
}
|
||||
|
||||
@@ -1061,15 +1156,18 @@
|
||||
hash: Hash,
|
||||
ranges: <span class="kw-2">&</span>RangeSpec,
|
||||
<span class="kw-2">mut </span>writer: W,
|
||||
events: EventSender,
|
||||
mk_progress: <span class="kw">impl </span>Fn(u64) -> Event,
|
||||
) -> <span class="prelude-ty">Result</span><(SentStatus, u64, SliceReaderStats)> {
|
||||
<span class="kw">match </span>db.get(<span class="kw-2">&</span>hash).<span class="kw">await</span><span class="question-mark">? </span>{
|
||||
<span class="prelude-val">Some</span>(entry) => {
|
||||
<span class="kw">let </span>outboard = entry.outboard().<span class="kw">await</span><span class="question-mark">?</span>;
|
||||
<span class="kw">let </span>size = outboard.tree().size();
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>file_reader = TrackingSliceReader::new(entry.data_reader().<span class="kw">await</span><span class="question-mark">?</span>);
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>sending_reader = SendingSliceReader::new(<span class="kw-2">&mut </span>file_reader, events, mk_progress);
|
||||
writer.write(size.to_le_bytes().as_slice()).<span class="kw">await</span><span class="question-mark">?</span>;
|
||||
encode_ranges_validated(
|
||||
<span class="kw-2">&mut </span>file_reader,
|
||||
<span class="kw-2">&mut </span>sending_reader,
|
||||
outboard,
|
||||
<span class="kw-2">&</span>ranges.to_chunk_ranges(),
|
||||
writer,
|
||||
|
||||
@@ -995,6 +995,9 @@
|
||||
<a href="#995" id="995">995</a>
|
||||
<a href="#996" id="996">996</a>
|
||||
<a href="#997" id="997">997</a>
|
||||
<a href="#998" id="998">998</a>
|
||||
<a href="#999" id="999">999</a>
|
||||
<a href="#1000" id="1000">1000</a>
|
||||
</pre></div><pre class="rust"><code><span class="doccomment">//! Networking for the `iroh-gossip` protocol
|
||||
|
||||
</span><span class="kw">use </span>anyhow::{anyhow, Context <span class="kw">as _</span>, <span class="prelude-ty">Result</span>};
|
||||
@@ -1498,8 +1501,9 @@
|
||||
neighbors,
|
||||
event_senders,
|
||||
command_rx_keys,
|
||||
joined,
|
||||
} = state;
|
||||
<span class="kw">if </span>!neighbors.is_empty() {
|
||||
<span class="kw">if </span><span class="kw-2">*</span>joined {
|
||||
<span class="kw">let </span>neighbors = neighbors.iter().copied().collect();
|
||||
channels
|
||||
.event_tx
|
||||
@@ -1585,14 +1589,15 @@
|
||||
<span class="kw">continue</span>;
|
||||
};
|
||||
<span class="kw">let </span>TopicState {
|
||||
joined,
|
||||
neighbors,
|
||||
event_senders,
|
||||
command_rx_keys,
|
||||
} = state;
|
||||
<span class="kw">let </span>event = <span class="kw">if let </span>ProtoEvent::NeighborUp(neighbor) = event {
|
||||
<span class="kw">let </span>was_empty = neighbors.is_empty();
|
||||
neighbors.insert(neighbor);
|
||||
<span class="kw">if </span>was_empty {
|
||||
<span class="kw">if </span>!<span class="kw-2">*</span>joined {
|
||||
<span class="kw-2">*</span>joined = <span class="bool-val">true</span>;
|
||||
GossipEvent::Joined(<span class="macro">vec!</span>[neighbor])
|
||||
} <span class="kw">else </span>{
|
||||
GossipEvent::NeighborUp(neighbor)
|
||||
@@ -1659,6 +1664,7 @@
|
||||
|
||||
<span class="attr">#[derive(Debug, Default)]
|
||||
</span><span class="kw">struct </span>TopicState {
|
||||
joined: bool,
|
||||
neighbors: BTreeSet<NodeId>,
|
||||
event_senders: EventSenders,
|
||||
command_rx_keys: HashSet<stream_group::Key>,
|
||||
|
||||
@@ -252,6 +252,28 @@
|
||||
<a href="#252" id="252">252</a>
|
||||
<a href="#253" id="253">253</a>
|
||||
<a href="#254" id="254">254</a>
|
||||
<a href="#255" id="255">255</a>
|
||||
<a href="#256" id="256">256</a>
|
||||
<a href="#257" id="257">257</a>
|
||||
<a href="#258" id="258">258</a>
|
||||
<a href="#259" id="259">259</a>
|
||||
<a href="#260" id="260">260</a>
|
||||
<a href="#261" id="261">261</a>
|
||||
<a href="#262" id="262">262</a>
|
||||
<a href="#263" id="263">263</a>
|
||||
<a href="#264" id="264">264</a>
|
||||
<a href="#265" id="265">265</a>
|
||||
<a href="#266" id="266">266</a>
|
||||
<a href="#267" id="267">267</a>
|
||||
<a href="#268" id="268">268</a>
|
||||
<a href="#269" id="269">269</a>
|
||||
<a href="#270" id="270">270</a>
|
||||
<a href="#271" id="271">271</a>
|
||||
<a href="#272" id="272">272</a>
|
||||
<a href="#273" id="273">273</a>
|
||||
<a href="#274" id="274">274</a>
|
||||
<a href="#275" id="275">275</a>
|
||||
<a href="#276" id="276">276</a>
|
||||
</pre></div><pre class="rust"><code><span class="doccomment">//! Topic handles for sending and receiving on a gossip topic.
|
||||
//!
|
||||
//! These are returned from [`super::Gossip`].
|
||||
@@ -262,7 +284,7 @@
|
||||
task::{Context, Poll},
|
||||
};
|
||||
|
||||
<span class="kw">use </span>anyhow::{anyhow, <span class="prelude-ty">Result</span>};
|
||||
<span class="kw">use </span>anyhow::{anyhow, Context <span class="kw">as _</span>, <span class="prelude-ty">Result</span>};
|
||||
<span class="kw">use </span>bytes::Bytes;
|
||||
<span class="kw">use </span>futures_lite::{Stream, StreamExt};
|
||||
<span class="kw">use </span>iroh_net::NodeId;
|
||||
@@ -366,6 +388,7 @@
|
||||
<span class="attr">#[debug(<span class="string">"EventStream"</span>)]
|
||||
</span>stream: EventStream,
|
||||
neighbors: HashSet<NodeId>,
|
||||
joined: bool,
|
||||
}
|
||||
|
||||
<span class="kw">impl </span>GossipReceiver {
|
||||
@@ -373,6 +396,7 @@
|
||||
<span class="self">Self </span>{
|
||||
stream: events_rx,
|
||||
neighbors: Default::default(),
|
||||
joined: <span class="bool-val">false</span>,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -382,9 +406,22 @@
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Waits until we are connected to at least one node.
|
||||
///
|
||||
/// This progresses the stream until we received [`GossipEvent::Joined`], which is the first
|
||||
/// item emitted on the stream.
|
||||
///
|
||||
/// Note that this consumes the [`GossipEvent::Joined`] event. If you want to act on these
|
||||
/// initial neighbors, use [`Self::neighbors`] after awaiting [`Self::joined`].
|
||||
</span><span class="kw">pub async fn </span>joined(<span class="kw-2">&mut </span><span class="self">self</span>) -> <span class="prelude-ty">Result</span><()> {
|
||||
<span class="kw">while </span><span class="self">self</span>.neighbors.is_empty() {
|
||||
<span class="kw">let _ </span>= <span class="self">self</span>.try_next().<span class="kw">await</span><span class="question-mark">?</span>;
|
||||
<span class="kw">if </span>!<span class="self">self</span>.joined {
|
||||
<span class="kw">match </span><span class="self">self
|
||||
</span>.try_next()
|
||||
.<span class="kw">await</span><span class="question-mark">?
|
||||
</span>.context(<span class="string">"Gossip receiver closed before Joined event was received."</span>)<span class="question-mark">?
|
||||
</span>{
|
||||
Event::Gossip(GossipEvent::Joined(<span class="kw">_</span>)) => {}
|
||||
<span class="kw">_ </span>=> <span class="macro">anyhow::bail!</span>(<span class="string">"Expected Joined event to be the first event received."</span>),
|
||||
}
|
||||
}
|
||||
<span class="prelude-val">Ok</span>(())
|
||||
}
|
||||
@@ -402,6 +439,7 @@
|
||||
<span class="kw">if let </span><span class="prelude-val">Some</span>(<span class="prelude-val">Ok</span>(item)) = <span class="kw-2">&</span>item {
|
||||
<span class="kw">match </span>item {
|
||||
Event::Gossip(GossipEvent::Joined(neighbors)) => {
|
||||
<span class="self">self</span>.joined = <span class="bool-val">true</span>;
|
||||
<span class="self">self</span>.neighbors.extend(neighbors.iter().copied());
|
||||
}
|
||||
Event::Gossip(GossipEvent::NeighborUp(node_id)) => {
|
||||
@@ -417,26 +455,32 @@
|
||||
}
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Update from a subscribed gossip topic.
|
||||
<span class="doccomment">/// Events emitted from a gossip topic with a lagging notification.
|
||||
///
|
||||
/// This is the item of the [`GossipReceiver`] stream. It wraps the actual gossip events to also
|
||||
/// provide a notification if we missed gossip events for the topic.
|
||||
</span><span class="attr">#[derive(Serialize, Deserialize, Debug, Eq, PartialEq)]
|
||||
</span><span class="kw">pub enum </span>Event {
|
||||
<span class="doccomment">/// A message was received.
|
||||
<span class="doccomment">/// We received an event.
|
||||
</span>Gossip(GossipEvent),
|
||||
<span class="doccomment">/// We missed some messages.
|
||||
<span class="doccomment">/// We missed some messages because our [`GossipReceiver`] was not progressing fast enough.
|
||||
</span>Lagged,
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Gossip event
|
||||
/// An event to be emitted to the application for a particular topic.
|
||||
<span class="doccomment">/// Events emitted from a gossip topic.
|
||||
///
|
||||
/// These are the events emitted from a [`GossipReceiver`], wrapped in [`Event::Gossip`].
|
||||
</span><span class="attr">#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Serialize, Deserialize)]
|
||||
</span><span class="kw">pub enum </span>GossipEvent {
|
||||
<span class="doccomment">/// We joined the topic with at least one peer.
|
||||
///
|
||||
/// This is the first event on a [`GossipReceiver`] and will only be emitted once.
|
||||
</span>Joined(Vec<NodeId>),
|
||||
<span class="doccomment">/// We have a new, direct neighbor in the swarm membership layer for this topic
|
||||
<span class="doccomment">/// We have a new, direct neighbor in the swarm membership layer for this topic.
|
||||
</span>NeighborUp(NodeId),
|
||||
<span class="doccomment">/// We dropped direct neighbor in the swarm membership layer for this topic
|
||||
<span class="doccomment">/// We dropped direct neighbor in the swarm membership layer for this topic.
|
||||
</span>NeighborDown(NodeId),
|
||||
<span class="doccomment">/// A gossip message was received for this topic
|
||||
<span class="doccomment">/// We received a gossip message for this topic.
|
||||
</span>Received(Message),
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user