MCPcopy Index your code
hub / github.com/RustPython/RustPython / write

Method write

crates/vm/src/stdlib/_io.rs:279–286  ·  view source on GitHub ↗
(&mut self, data: &[u8])

Source from the content-addressed store, hash-verified

277 }
278
279 fn write(&mut self, data: &[u8]) -> Option<u64> {
280 if data.is_empty() {
281 return Some(0);
282 }
283 let length = data.len();
284 self.cursor.write_all(data).ok()?;
285 Some(length as u64)
286 }
287
288 //return the entire contents of the underlying
289 fn getvalue(&self) -> Vec<u8> {

Callers 6

writeMethod · 0.45
initMethod · 0.45
bufferMethod · 0.45
__setstate__Method · 0.45
_io.rsFile · 0.45
try_resizable_optMethod · 0.45

Calls 15

newFunction · 0.85
_unsupportedFunction · 0.85
io_closed_errorFunction · 0.85
handle_from_fdFunction · 0.85
is_invalid_handleFunction · 0.85
find_last_utf8_boundaryFunction · 0.85
wchar_to_utf8_countFunction · 0.85
okMethod · 0.80
valid_readMethod · 0.80
valid_writeMethod · 0.80
adjust_positionMethod · 0.80

Tested by

no test coverage detected