pub struct MlxIoWriter { /* private fields */ }Expand description
Owned MLX writer transport released exactly once.
Implementations§
Source§impl MlxIoWriter
impl MlxIoWriter
Sourcepub unsafe fn from_parts(
descriptor: *mut c_void,
vtable: mlx_io_vtable,
) -> Result<Self, MlxCError>
pub unsafe fn from_parts( descriptor: *mut c_void, vtable: mlx_io_vtable, ) -> Result<Self, MlxCError>
Builds an owned writer from a descriptor and vtable following the MLX-C io contract.
§Safety
The descriptor must satisfy the vtable’s expectations for the writer’s whole lifetime, and every vtable slot must be a valid C ABI function.
Sourcepub fn descriptor(&self) -> Result<*mut c_void, MlxCError>
pub fn descriptor(&self) -> Result<*mut c_void, MlxCError>
The descriptor this transport was built with.
Sourcepub fn to_string_lossy(&self) -> Result<String, MlxCError>
pub fn to_string_lossy(&self) -> Result<String, MlxCError>
Renders the writer description text.
Trait Implementations§
Source§impl Debug for MlxIoWriter
impl Debug for MlxIoWriter
Source§impl Drop for MlxIoWriter
impl Drop for MlxIoWriter
Auto Trait Implementations§
impl !Send for MlxIoWriter
impl !Sync for MlxIoWriter
impl Freeze for MlxIoWriter
impl RefUnwindSafe for MlxIoWriter
impl Unpin for MlxIoWriter
impl UnsafeUnpin for MlxIoWriter
impl UnwindSafe for MlxIoWriter
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