pub struct ResourceTransfers(/* private fields */);Implementations§
Source§impl ResourceTransfers
impl ResourceTransfers
Sourcepub async fn prepare(
&self,
root: &Path,
path: &Path,
workspace: WorkspaceId,
revision: u64,
peer: PeerId,
) -> Result<ResourceTicket, Error>
pub async fn prepare( &self, root: &Path, path: &Path, workspace: WorkspaceId, revision: u64, peer: PeerId, ) -> Result<ResourceTicket, Error>
Caller has already checked this resource’s public/direct audience. The source must be an application-owned immutable snapshot, not a live file.
Sourcepub fn revoke(&self, path: Option<&Path>)
pub fn revoke(&self, path: Option<&Path>)
Withdraw before deleting a source, or pass None when serving preferences change. Active streams are cancelled too, not just future admissions.
Sourcepub async fn fetch(
&self,
root: &Path,
target: &Path,
workspace: WorkspaceId,
revision: u64,
peer: PeerId,
ticket: ResourceTicket,
progress: Sender<u64>,
) -> Result<(), Error>
pub async fn fetch( &self, root: &Path, target: &Path, workspace: WorkspaceId, revision: u64, peer: PeerId, ticket: ResourceTicket, progress: Sender<u64>, ) -> Result<(), Error>
Standard verified range download; retains at most one partial in this
workspace store. target is a private caller-owned temporary path.
The caller reserves disk/quota using the authenticated advertised size.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ResourceTransfers
impl !UnwindSafe for ResourceTransfers
impl Forget for ResourceTransfers
impl Freeze for ResourceTransfers
impl Move for ResourceTransfers
impl Send for ResourceTransfers
impl Sync for ResourceTransfers
impl Unpin for ResourceTransfers
impl UnsafeUnpin for ResourceTransfers
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