[−][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<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>
Calls to Context::transfer_encode_resource
will be forwarded to this method. Read more
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<SchemeValidation: Default + ConstSwitch> Default for FsResourceLoader<SchemeValidation>
[src]
fn default() -> FsResourceLoader<SchemeValidation>
[src]
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]
Performs copy-assignment from source
. Read more
impl<SchemeValidation: Debug + ConstSwitch> Debug for FsResourceLoader<SchemeValidation>
[src]
Auto Trait Implementations
impl<SchemeValidation> Send for FsResourceLoader<SchemeValidation>
impl<SchemeValidation> Sync for FsResourceLoader<SchemeValidation>
Blanket Implementations
impl<C> ResourceLoaderComponent for C where
C: Context,
[src]
C: Context,
fn load_resource<impl Context>(
&Self,
&Source,
&impl Context
) -> Box<dyn Future<Item = MaybeEncData, Error = ResourceLoadingError> + 'static + Send> where
impl Context: Context,
[src]
&Self,
&Source,
&impl Context
) -> Box<dyn Future<Item = MaybeEncData, Error = ResourceLoadingError> + 'static + Send> where
impl Context: Context,
fn load_transfer_encoded_resource<impl Context>(
&Self,
&Resource,
&impl Context
) -> Box<dyn Future<Item = EncData, Error = ResourceLoadingError> + 'static + Send> where
impl Context: Context,
[src]
&Self,
&Resource,
&impl Context
) -> Box<dyn Future<Item = EncData, Error = ResourceLoadingError> + 'static + Send> where
impl Context: Context,
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> TryFrom 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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<F, T> HeaderTryInto for F where
T: HeaderTryFrom<F>,
[src]
T: HeaderTryFrom<F>,