Struct veloren_common_assets::source::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
§fn exists(&self, _entry: DirEntry<'_>) -> bool
fn exists(&self, _entry: DirEntry<'_>) -> bool
Returns
true
if the entry points at an existing entity. Read moreAuto 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