pub struct RemoteImageFetcher { /* private fields */ }Expand description
Fetches remote images without following unchecked DNS or redirects.
Implementations§
Source§impl RemoteImageFetcher
impl RemoteImageFetcher
Sourcepub const fn new(policy: RemoteInputPolicy, limits: ImageLimits) -> Self
pub const fn new(policy: RemoteInputPolicy, limits: ImageLimits) -> Self
Creates a fetcher. Disabled policy remains a valid fail-closed instance.
Sourcepub async fn fetch(&self, value: &str) -> Result<LoadedImage, BridgeError>
pub async fn fetch(&self, value: &str) -> Result<LoadedImage, BridgeError>
Fetches and verifies one HTTP(S) image.
Trait Implementations§
Source§impl Clone for RemoteImageFetcher
impl Clone for RemoteImageFetcher
Source§fn clone(&self) -> RemoteImageFetcher
fn clone(&self) -> RemoteImageFetcher
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 moreAuto Trait Implementations§
impl Freeze for RemoteImageFetcher
impl RefUnwindSafe for RemoteImageFetcher
impl Send for RemoteImageFetcher
impl Sync for RemoteImageFetcher
impl Unpin for RemoteImageFetcher
impl UnsafeUnpin for RemoteImageFetcher
impl UnwindSafe for RemoteImageFetcher
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