#[repr(C)]pub struct FidiusStreamHandle {
pub next: unsafe extern "C" fn(*mut FidiusStreamHandle, *mut u8, u32, *mut u32) -> i32,
pub drop_fn: unsafe extern "C" fn(*mut FidiusStreamHandle),
pub state: *mut c_void,
}Expand description
Per-stream handle returned by a cdylib streaming method’s init shim. See the
module docs for the pull protocol. #[repr(C)] so the guest (which builds it)
and the host (which drives it) agree on the layout across the FFI boundary.
Fields§
§next: unsafe extern "C" fn(*mut FidiusStreamHandle, *mut u8, u32, *mut u32) -> i32Advance one item into a host-provided buffer.
(handle, buf_ptr, buf_cap, &mut out_len) -> status.
drop_fn: unsafe extern "C" fn(*mut FidiusStreamHandle)Finish/cancel: drops the producer and frees the handle box. Call exactly once.
state: *mut c_voidOpaque pointer to the boxed StreamState<T>, owned by the guest; freed
by drop_fn.
Auto Trait Implementations§
impl !Send for FidiusStreamHandle
impl !Sync for FidiusStreamHandle
impl Freeze for FidiusStreamHandle
impl RefUnwindSafe for FidiusStreamHandle
impl Unpin for FidiusStreamHandle
impl UnsafeUnpin for FidiusStreamHandle
impl UnwindSafe for FidiusStreamHandle
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