pub struct BlobsProtocol { /* private fields */ }
Expand description
A protocol handler for the blobs protocol.
Implementations§
Source§impl BlobsProtocol
impl BlobsProtocol
pub fn new( store: &Store, endpoint: Endpoint, events: Option<Sender<Event>>, ) -> Self
pub fn store(&self) -> &Store
pub fn endpoint(&self) -> &Endpoint
Sourcepub async fn ticket(
&self,
content: impl Into<HashAndFormat>,
) -> Result<BlobTicket>
pub async fn ticket( &self, content: impl Into<HashAndFormat>, ) -> Result<BlobTicket>
Create a ticket for content on this node.
Note that this does not check whether the content is partially or fully available. It is just a convenience method to create a ticket from content and the address of this node.
Trait Implementations§
Source§impl Clone for BlobsProtocol
impl Clone for BlobsProtocol
Source§fn clone(&self) -> BlobsProtocol
fn clone(&self) -> BlobsProtocol
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for BlobsProtocol
impl Debug for BlobsProtocol
Auto Trait Implementations§
impl Freeze for BlobsProtocol
impl !RefUnwindSafe for BlobsProtocol
impl Send for BlobsProtocol
impl Sync for BlobsProtocol
impl Unpin for BlobsProtocol
impl !UnwindSafe for BlobsProtocol
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,
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<P> DynProtocolHandler for Pwhere
P: ProtocolHandler,
impl<P> DynProtocolHandler for Pwhere
P: ProtocolHandler,
§fn accept(
&self,
connection: Connection,
) -> Pin<Box<dyn Future<Output = Result<(), AcceptError>> + Send + '_>>
fn accept( &self, connection: Connection, ) -> Pin<Box<dyn Future<Output = Result<(), AcceptError>> + Send + '_>>
See [
ProtocolHandler::accept
].