pub struct SendManager { /* private fields */ }Implementations§
Source§impl SendManager
impl SendManager
pub async fn open( blobs_dir: PathBuf, pool: ConnPool, routes: RoutingTable, acl: AclEngine, self_endpoint_id: String, ) -> Result<Self>
pub async fn from_store( store: FsStore, pool: ConnPool, routes: RoutingTable, acl: AclEngine, self_endpoint_id: String, ) -> Result<Self>
pub fn set_client_tx(&self, tx: Sender<ClientMsg>)
pub fn blobs_protocol(&self) -> BlobsProtocol
pub fn config(&self) -> SendConfig
pub fn set_config(&self, cfg: SendConfig)
pub fn list_active(&self) -> Vec<TransferRecord>
pub fn list_history(&self) -> Vec<TransferRecord>
pub fn list_pending(&self) -> Vec<TransferRecord>
Sourcepub fn resolve_targets(&self, target: &str) -> Result<Vec<Arc<PeerInfo>>>
pub fn resolve_targets(&self, target: &str) -> Result<Vec<Arc<PeerInfo>>>
Resolve target hostname / IP / endpoint id / tag:foo to peer endpoint ids.
Sourcepub async fn send_file(
&self,
path: &Path,
target: &str,
message: Option<String>,
) -> Result<Vec<TransferRecord>>
pub async fn send_file( &self, path: &Path, target: &str, message: Option<String>, ) -> Result<Vec<TransferRecord>>
Import path, offer to target(s), serve via blobs ALPN.
When transfer_id is Some, it is used for the first (or only) peer so
control-plane / dashboard IDs stay aligned. Extra multicast peers get new UUIDs.
pub async fn send_file_with_id( &self, path: &Path, target: &str, message: Option<String>, transfer_id: Option<String>, ) -> Result<Vec<TransferRecord>>
Sourcepub async fn handle_offer_connection(&self, conn: Connection)
pub async fn handle_offer_connection(&self, conn: Connection)
Handle inbound SEND_ALPN connection (offer stream).
True when this machine and the peer share at least one mesh tag.
pub async fn accept_pending(&self, transfer_id: &str) -> Result<TransferRecord>
pub async fn reject_pending( &self, transfer_id: &str, reason: Option<String>, ) -> Result<()>
Sourcepub async fn handle_blobs_connection(&self, conn: Connection)
pub async fn handle_blobs_connection(&self, conn: Connection)
Serve an inbound blobs ALPN connection.
Sourcepub async fn handle_blobs_connection_trusted(&self, conn: Connection)
pub async fn handle_blobs_connection_trusted(&self, conn: Connection)
Blobs accept without ACL (Direct PSK-authed peers / iroh-docs sync).
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for SendManager
impl !UnwindSafe for SendManager
impl Freeze for SendManager
impl Send for SendManager
impl Sync for SendManager
impl Unpin for SendManager
impl UnsafeUnpin for SendManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more