pub struct FakeUrlSafety;Expand description
A UrlSafety that knows every URL as clean. It runs the port’s own
check_url first, as every adapter must, so a fixture URL that is
not http(s) or is over the length ceiling is refused the same way the
real adapters refuse it. Wired into crate::full_fake_ports so the
conformance kit and the runtime clone checks see the port present.
Trait Implementations§
Source§impl Clone for FakeUrlSafety
impl Clone for FakeUrlSafety
impl Copy for FakeUrlSafety
Source§impl Debug for FakeUrlSafety
impl Debug for FakeUrlSafety
Source§impl Default for FakeUrlSafety
impl Default for FakeUrlSafety
Source§impl UrlSafety for FakeUrlSafety
impl UrlSafety for FakeUrlSafety
Source§fn check<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<UrlVerdict, UrlSafetyError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn check<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<UrlVerdict, UrlSafetyError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Checks one URL. The returned verdict’s
url equals the input,
verbatim. Read moreSource§fn check_many<'life0, 'life1, 'async_trait>(
&'life0 self,
urls: &'life1 [String],
) -> Pin<Box<dyn Future<Output = Result<Vec<UrlVerdict>, UrlSafetyError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn check_many<'life0, 'life1, 'async_trait>(
&'life0 self,
urls: &'life1 [String],
) -> Pin<Box<dyn Future<Output = Result<Vec<UrlVerdict>, UrlSafetyError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Checks many URLs; the results are in input order, one verdict per
input. The default runs
check_batch locally, then
Self::check in a loop; a batch-friendly adapter overrides this
with one provider call. Read moreAuto Trait Implementations§
impl Freeze for FakeUrlSafety
impl RefUnwindSafe for FakeUrlSafety
impl Send for FakeUrlSafety
impl Sync for FakeUrlSafety
impl Unpin for FakeUrlSafety
impl UnsafeUnpin for FakeUrlSafety
impl UnwindSafe for FakeUrlSafety
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