mod record;
mod replay;
mod transcript;
pub use record::{RecordingPort, RecordingProvider, record};
pub use replay::{ReplayPort, ReplayProvider, replay};
pub use transcript::{Entry, Event, HostToken, OpenFailure, Transcript, TranscriptError};
#[cfg(feature = "flash")]
#[derive(Debug, Clone, Default, PartialEq, Eq)]
pub struct MemorySource {
pub files: alloc::collections::BTreeMap<alloc::string::String, alloc::vec::Vec<u8>>,
}
#[cfg(feature = "flash")]
impl crate::flash::ImageSource for MemorySource {
async fn read(&mut self, path: &str) -> Result<alloc::vec::Vec<u8>, alloc::string::String> {
self.files
.get(path)
.cloned()
.ok_or_else(|| alloc::string::String::from("no such file"))
}
}