MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / push

Method push

crates/core/src/alloc/string.rs:183–187  ·  view source on GitHub ↗
(&mut self, c: char)

Source from the content-addressed store, hash-verified

181 /// failure.
182 #[inline]
183 pub fn push(&mut self, c: char) -> Result<(), OutOfMemory> {
184 self.reserve(c.len_utf8())?;
185 self.inner.push(c);
186 Ok(())
187 }
188
189 /// Same as [`std::string::String::push_str`] but returns an error on
190 /// allocation failure.

Callers

nothing calls this directly

Calls 2

OkFunction · 0.85
reserveMethod · 0.45

Tested by

no test coverage detected