You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: writemem.rs
    path of file: ./repos/headcrab/src/target/linux
    
    the code of the file until where you have to start completion: use super::memory::{split_protected, MemoryOp};
use super::LinuxTarget;
use crate::CrabResult;
use nix::{sys::ptrace, unistd::Pid};
use std::{cmp, marker::PhantomData, mem, slice};

const WORD_SIZE: usize = mem::size_of::<usize>();

/// Write operations don't 
    
pub(crate) unsafe fn write_process_vm(pid: Pid, write_ops: &[WriteOp]) -> CrabResult<()> {
    // Create a list of `IoVec`s and remote `IoVec`s
    let remote_iov = write_ops
        .iter()
        .map(WriteOp::as_remote_iovec)
        .collect::<Vec<_>>();

    let local_iov = write_ops
        .iter()
        .map(WriteOp::as_local_iovec)
        .collect::<Vec<_>>();

    let bytes_written = libc::process_vm_writev(
        pid.into(),
        local_iov.as_ptr(),
        local_iov.len() as libc::c_ulong,
        remote_iov.as_ptr(),
        remote_iov.len() as libc::c_ulong,
        0,
    );

    if bytes_written == -1 {
        // fixme: return a proper error type
        return Err(Box::new(nix::Error::last()));
    }

    Ok(())
}