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: string_array.rs
    path of file: ./repos/wasmtime/crates/wasi-common/src
    
    the code of the file until where you have to start completion: use crate::{Error, ErrorExt};
use wiggle::GuestPtr;

pub struct StringArray {
    elems: Vec<String>,
}

#[derive(Debug, thiserror::Error)]
pub enum StringArrayError {
    #[error("Number of elements exceeds 2^32")]
    NumberElements,
    #[error("Element size exceeds 2^32")]
    ElementSize,
    #[error("Cumulative size exceeds
    
    pub fn push(&mut self, elem: String) -> Result<(), StringArrayError> {
        if self.elems.len() + 1 > std::u32::MAX as usize {
            return Err(StringArrayError::NumberElements);
        }
        if elem.as_bytes().len() + 1 > std::u32::MAX as usize {
            return Err(StringArrayError::ElementSize);
        }
        if self.cumulative_size() as usize + elem.as_bytes().len() + 1 > std::u32::MAX as usize {
            return Err(StringArrayError::CumulativeSize);
        }
        self.elems.push(elem);
        Ok(())
    }