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 UnsafeUnpin 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
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more