[−][src]Struct mail_core::default_impl::FsResourceLoader
By setting SchemeValidation to Disabled the FsResourceLoader can be used to simple
load a resource from a file based on a scheme tail as path independent of the rest,
so e.g. it it is used in a Mux which selects a ResourceLoader impl based on a scheme
the scheme would not be double validated.
Methods
impl<SVSw> FsResourceLoader<SVSw> where
SVSw: ConstSwitch, [src]
SVSw: ConstSwitch,
pub fn new<P: Into<PathBuf>>(root: P) -> Self[src]
create a new file system based FileLoader, which will "just" standard blocking IO to read a file from the file system into a buffer
pub fn new_with_scheme<P: Into<PathBuf>>(root: P, scheme: &'static str) -> Self[src]
pub fn with_cwd_root() -> Result<Self, Error>[src]
pub fn root(&self) -> &Path[src]
pub fn scheme(&self) -> &'static str[src]
pub fn does_validate_scheme(&self) -> bool[src]
pub fn iri_has_compatible_scheme(&self, iri: &IRI) -> bool[src]
Trait Implementations
impl<SchemeValidation: Clone + ConstSwitch> Clone for FsResourceLoader<SchemeValidation>[src]
fn clone(&self) -> FsResourceLoader<SchemeValidation>[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
impl<SchemeValidation: Debug + ConstSwitch> Debug for FsResourceLoader<SchemeValidation>[src]
impl<SchemeValidation: Default + ConstSwitch> Default for FsResourceLoader<SchemeValidation>[src]
fn default() -> FsResourceLoader<SchemeValidation>[src]
impl<SchemeValidation: PartialEq + ConstSwitch> PartialEq<FsResourceLoader<SchemeValidation>> for FsResourceLoader<SchemeValidation>[src]
fn eq(&self, other: &FsResourceLoader<SchemeValidation>) -> bool[src]
fn ne(&self, other: &FsResourceLoader<SchemeValidation>) -> bool[src]
impl<ValidateScheme> ResourceLoaderComponent for FsResourceLoader<ValidateScheme> where
ValidateScheme: ConstSwitch, [src]
ValidateScheme: ConstSwitch,
fn load_resource(
&self,
source: &Source,
ctx: &impl Context
) -> SendBoxFuture<MaybeEncData, ResourceLoadingError>[src]
&self,
source: &Source,
ctx: &impl Context
) -> SendBoxFuture<MaybeEncData, ResourceLoadingError>
fn load_transfer_encoded_resource(
&self,
resource: &Resource,
ctx: &impl Context
) -> SendBoxFuture<EncData, ResourceLoadingError>[src]
&self,
resource: &Resource,
ctx: &impl Context
) -> SendBoxFuture<EncData, ResourceLoadingError>
impl<SchemeValidation: ConstSwitch> StructuralPartialEq for FsResourceLoader<SchemeValidation>[src]
Auto Trait Implementations
impl<SchemeValidation> RefUnwindSafe for FsResourceLoader<SchemeValidation> where
SchemeValidation: RefUnwindSafe,
SchemeValidation: RefUnwindSafe,
impl<SchemeValidation> Send for FsResourceLoader<SchemeValidation>
impl<SchemeValidation> Sync for FsResourceLoader<SchemeValidation>
impl<SchemeValidation> Unpin for FsResourceLoader<SchemeValidation> where
SchemeValidation: Unpin,
SchemeValidation: Unpin,
impl<SchemeValidation> UnwindSafe for FsResourceLoader<SchemeValidation> where
SchemeValidation: UnwindSafe,
SchemeValidation: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Erased for T[src]
impl<T> From<T> for T[src]
impl<T> HeaderTryFrom<T> for T[src]
fn try_from(val: T) -> Result<T, ComponentCreationError>[src]
impl<F, T> HeaderTryInto<T> for F where
T: HeaderTryFrom<F>, [src]
T: HeaderTryFrom<F>,
fn try_into(self) -> Result<T, ComponentCreationError>[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<C> ResourceLoaderComponent for C where
C: Context, [src]
C: Context,
fn load_resource(
&Self,
&Source,
&impl Context
) -> Box<dyn Future<Error = ResourceLoadingError, Item = MaybeEncData> + 'static + Send>[src]
&Self,
&Source,
&impl Context
) -> Box<dyn Future<Error = ResourceLoadingError, Item = MaybeEncData> + 'static + Send>
fn load_transfer_encoded_resource(
&Self,
&Resource,
&impl Context
) -> Box<dyn Future<Error = ResourceLoadingError, Item = EncData> + 'static + Send>[src]
&Self,
&Resource,
&impl Context
) -> Box<dyn Future<Error = ResourceLoadingError, Item = EncData> + 'static + Send>
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,