#[repr(C)]pub struct NetBlobAdapterVtable {
pub store: NetBlobAdapterStoreFn,
pub fetch: NetBlobAdapterFetchFn,
pub fetch_range: NetBlobAdapterFetchRangeFn,
pub exists: NetBlobAdapterExistsFn,
pub free_buffer: NetBlobAdapterFreeFn,
}Expand description
Function-pointer-table the C-side caller passes to
net_blob_register_callback_adapter. The struct is #[repr(C)]
for cross-ABI stability.
Fields§
§store: NetBlobAdapterStoreFnstore(ctx, uri, hash, size, data, data_len) -> c_int
fetch: NetBlobAdapterFetchFnfetch(ctx, uri, hash, size, &out_data, &out_len) -> c_int
fetch_range: NetBlobAdapterFetchRangeFnfetch_range(ctx, uri, hash, size, start, end, &out_data, &out_len)
exists: NetBlobAdapterExistsFnexists(ctx, uri, hash, size, &out_exists) -> c_int
free_buffer: NetBlobAdapterFreeFnfree_buffer(ctx, data, len) — substrate calls this after
consuming a buffer the caller returned via fetch /
fetch_range.
Trait Implementations§
Source§impl Clone for NetBlobAdapterVtable
impl Clone for NetBlobAdapterVtable
Source§fn clone(&self) -> NetBlobAdapterVtable
fn clone(&self) -> NetBlobAdapterVtable
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for NetBlobAdapterVtable
Auto Trait Implementations§
impl Freeze for NetBlobAdapterVtable
impl RefUnwindSafe for NetBlobAdapterVtable
impl Send for NetBlobAdapterVtable
impl Sync for NetBlobAdapterVtable
impl Unpin for NetBlobAdapterVtable
impl UnsafeUnpin for NetBlobAdapterVtable
impl UnwindSafe for NetBlobAdapterVtable
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