pub struct Blobs { /* private fields */ }
Expand description
A protocol handler for the blobs protocol.
Implementations§
Source§impl Blobs
impl Blobs
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§
Auto Trait Implementations§
impl Freeze for Blobs
impl !RefUnwindSafe for Blobs
impl Send for Blobs
impl Sync for Blobs
impl Unpin for Blobs
impl !UnwindSafe for Blobs
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
].