pub struct FakeContentResolver { /* private fields */ }Expand description
In-memory fake content resolver fixture for SDK conformance tests. Use it to script deterministic behavior in memory; any transcript or endpoint mutation is documented on the method that performs it.
Implementations§
Source§impl FakeContentResolver
impl FakeContentResolver
Sourcepub fn insert_text(&self, content_ref: &ContentRef, text: impl Into<String>)
pub fn insert_text(&self, content_ref: &ContentRef, text: impl Into<String>)
Insert text. This reads or mutates deterministic in-memory test state unless the method explicitly names a fixture file.
Sourcepub fn assert_conformance<R: ContentResolver>(
resolver: &R,
present_ref: ContentRef,
missing_ref: ContentRef,
policy: ContentResolutionPolicy,
)
pub fn assert_conformance<R: ContentResolver>( resolver: &R, present_ref: ContentRef, missing_ref: ContentRef, policy: ContentResolutionPolicy, )
Assert conformance. This reads or mutates deterministic in-memory test state unless the method explicitly names a fixture file.
Trait Implementations§
Source§impl Clone for FakeContentResolver
impl Clone for FakeContentResolver
Source§fn clone(&self) -> FakeContentResolver
fn clone(&self) -> FakeContentResolver
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl ContentResolver for FakeContentResolver
impl ContentResolver for FakeContentResolver
Source§fn store_resolved_content(
&self,
content_ref: &ContentRef,
bytes: Vec<u8>,
) -> Result<(), ContentResolutionError>
fn store_resolved_content( &self, content_ref: &ContentRef, bytes: Vec<u8>, ) -> Result<(), ContentResolutionError>
Stores resolved content bytes and metadata in the content backing store.
Implementations store the resolved content bytes and metadata in the content resolver
backing store for later policy-checked lookup.
Source§fn resolve(
&self,
request: ContentResolveRequest,
policy: ContentResolutionPolicy,
) -> Result<ResolvedContent, ContentResolutionError>
fn resolve( &self, request: ContentResolveRequest, policy: ContentResolutionPolicy, ) -> Result<ResolvedContent, ContentResolutionError>
Resolves resolve through the configured ports::content boundary.
Concrete implementations own any backing-store, filesystem, or network
side effects.
Source§impl Debug for FakeContentResolver
impl Debug for FakeContentResolver
Source§impl Default for FakeContentResolver
impl Default for FakeContentResolver
Source§fn default() -> FakeContentResolver
fn default() -> FakeContentResolver
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for FakeContentResolver
impl RefUnwindSafe for FakeContentResolver
impl Send for FakeContentResolver
impl Sync for FakeContentResolver
impl Unpin for FakeContentResolver
impl UnsafeUnpin for FakeContentResolver
impl UnwindSafe for FakeContentResolver
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