MCPcopy Create free account
hub / github.com/cloud-hypervisor/cloud-hypervisor / read_from

Method read_from

vm-migration/src/protocol.rs:191–197  ·  view source on GitHub ↗
(fd: &mut dyn Read)

Source from the content-addressed store, hash-verified

189 }
190
191 pub fn read_from(fd: &mut dyn Read) -> Result<Request, MigratableError> {
192 let mut request = Request::default();
193 fd.read_exact(Self::as_mut_slice(&mut request))
194 .map_err(MigratableError::MigrateSocket)?;
195
196 Ok(request)
197 }
198
199 pub fn write_to(&self, fd: &mut dyn Write) -> Result<(), MigratableError> {
200 fd.write_all(Self::as_slice(self))

Callers

nothing calls this directly

Calls 1

as_mut_ptrMethod · 0.80

Tested by

no test coverage detected