pub struct FakeArchiveAccessor { /* private fields */ }
Expand description
FakeArchiveAccessor can be injected to provide test Inspect data to programs under test. On each ArchiveAccessor fetch, one of the strings in the [inspect_data] will be returned to the program. Strings should be JSON-formatted Inspect data.
Implementations§
Source§impl FakeArchiveAccessor
impl FakeArchiveAccessor
Sourcepub fn new(
inspect_data: &[String],
event_signaler: Option<Box<dyn EventSignaler>>,
) -> Arc<FakeArchiveAccessor>
pub fn new( inspect_data: &[String], event_signaler: Option<Box<dyn EventSignaler>>, ) -> Arc<FakeArchiveAccessor>
Create a FakeArchiveAccessor.
inspect_data: Strings to supply to the program under test via the ArchiveAccessor protocol. event_signaler: Callbacks to report events.
pub async fn serve_stream( &self, request_stream: ArchiveAccessorRequestStream, ) -> Result<(), Error>
pub fn serve_async(self: Arc<Self>, stream: ArchiveAccessorRequestStream)
pub fn get_selectors_requested(&self) -> Vec<BTreeSet<String>>
Auto Trait Implementations§
impl !Freeze for FakeArchiveAccessor
impl !RefUnwindSafe for FakeArchiveAccessor
impl Send for FakeArchiveAccessor
impl Sync for FakeArchiveAccessor
impl Unpin for FakeArchiveAccessor
impl !UnwindSafe for FakeArchiveAccessor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more