pub fn grow(&mut self, added_pages: u32) -> Result<(), io::Error> {
        let old_page_count = unsafe { ic0::stable_grow(added_pages) };
        if old_page_count < 0 {
            return Err(io::Error::new(
                io::ErrorKind::Other,
                "Failed to grow stable memory",
            ));
        }
        self.capacity = old_page_count as u32 + added_pages;
        Ok(())
    }
/// Attempt to grow the memory by adding new pages.
Attempt to grow the memory by adding new pages.
Attempt to grow the memory by adding new pages .
pub fn grow(&mut self, added_pages: u32) -> Result<(), io::Error> {
        let old_page_count = unsafe { ic0::stable_grow(added_pages) };
        if old_page_count < 0 {
            return Err(io::Error::new(
                io::ErrorKind::Other,
                "Failed to grow stable memory",
            ));
        }
        self.capacity = old_page_count as u32 + added_pages;
        Ok(())
    }
pub fn grow ( & mut self , added_pages : u32 ) -> Result < ( ) , io :: Error > { let old_page_count = unsafe { ic0 :: stable_grow ( added_pages ) } ; if old_page_count < 0 { return Err ( io :: Error :: new ( io :: ErrorKind :: Other , " " , ) ) ; } self . capacity = old_page_count as u32 + added_pages ; Ok ( ( ) ) }
Attempt to grow the memory by adding new pages.
Attempt to grow the memory by adding new pages .
&mut self
added_pages
u32
&mut self
added_pages
u32