MCPcopy Create free account
hub / github.com/Dstack-TEE/dstack / append_fixed_string

Function append_fixed_string

dstack-mr/src/acpi.rs:368–372  ·  view source on GitHub ↗

Appends a fixed-length, null-padded string to the data buffer.

(data: &mut Vec<u8>, s: &str)

Source from the content-addressed store, hash-verified

366
367/// Appends a fixed-length, null-padded string to the data buffer.
368fn append_fixed_string(data: &mut Vec<u8>, s: &str) {
369 let mut s_bytes = s.as_bytes().to_vec();
370 s_bytes.resize(FIXED_STRING_LEN, 0);
371 data.extend_from_slice(&s_bytes);
372}
373
374/// Appends a serialized QEMU loader command to the data buffer.
375fn qemu_loader_append(data: &mut Vec<u8>, cmd: LoaderCmd) {

Callers 1

qemu_loader_appendFunction · 0.85

Calls 1

to_vecMethod · 0.80

Tested by

no test coverage detected