/// Creates `Mapping` from the given serialization-friendly representation.
Creates `Mapping` from the given serialization-friendly representation.
Creates ` Mapping ` from the given serialization - friendly representation .
fn deserialize(
        serialized_mapping: MappingSerialization,
    ) -> Result<Option<Mapping>, PersistenceError> {
        // SAFETY: the file descriptor is valid because `serialized_mapping` is
        // guaranteed to be valid as a precondition.
        let file = unsafe { File::from_raw_fd(serialized_mapping.file_descriptor.fd) };
        Mapping::new(file, serialized_mapping.file_len as usize, None)
    }
fn deserialize ( serialized_mapping : MappingSerialization , ) -> Result < Option < Mapping > , PersistenceError > { // SAFETY: the file descriptor is valid because `serialized_mapping` is // guaranteed to be valid as a precondition. let file = unsafe { File :: from_raw_fd ( serialized_mapping . file_descriptor . fd ) } ; Mapping :: new ( file , serialized_mapping . file_len as usize , None ) }
Creates `Mapping` from the given serialization-friendly representation.
Creates ` Mapping ` from the given serialization - friendly representation .
serialized_mapping
MappingSerialization