Struct Empty
pub struct Empty;Expand description
A Source that contains nothing.
Calling read or read_dir from this source will always return an error.
Trait Implementations§
§impl Source for Empty
impl Source for Empty
§fn read(&self, _id: &str, _ext: &str) -> Result<FileContent<'_>, Error>
fn read(&self, _id: &str, _ext: &str) -> Result<FileContent<'_>, Error>
Try reading the source given an id and an extension. Read more
§fn read_dir(
&self,
_id: &str,
_f: &mut dyn FnMut(DirEntry<'_>),
) -> Result<(), Error>
fn read_dir( &self, _id: &str, _f: &mut dyn FnMut(DirEntry<'_>), ) -> Result<(), Error>
Reads the content of a directory. Read more
Auto Trait Implementations§
impl Freeze for Empty
impl RefUnwindSafe for Empty
impl Send for Empty
impl Sync for Empty
impl Unpin for Empty
impl UnwindSafe for Empty
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more