#[non_exhaustive]pub enum ViewSource {
Directory(PathBuf),
Embedded(Embedded),
}Expand description
Where a namespace’s views live: a directory, or files embedded in the binary with
embed!, as a package’s views are.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Directory(PathBuf)
A directory. A relative directory resolves against the application’s base path.
Embedded(Embedded)
Files embedded in the binary.
Trait Implementations§
Source§impl Clone for ViewSource
impl Clone for ViewSource
Source§fn clone(&self) -> ViewSource
fn clone(&self) -> ViewSource
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 moreSource§impl Debug for ViewSource
impl Debug for ViewSource
Source§impl<T> From<&T> for ViewSource
impl<T> From<&T> for ViewSource
Source§fn from(directory: &T) -> ViewSource
fn from(directory: &T) -> ViewSource
Converts to this type from the input type.
Source§impl From<Embedded> for ViewSource
impl From<Embedded> for ViewSource
Source§fn from(files: Embedded) -> ViewSource
fn from(files: Embedded) -> ViewSource
Converts to this type from the input type.
Source§impl From<PathBuf> for ViewSource
impl From<PathBuf> for ViewSource
Source§fn from(directory: PathBuf) -> ViewSource
fn from(directory: PathBuf) -> ViewSource
Converts to this type from the input type.
Source§impl From<String> for ViewSource
impl From<String> for ViewSource
Source§fn from(directory: String) -> ViewSource
fn from(directory: String) -> ViewSource
Converts to this type from the input type.
Auto Trait Implementations§
impl Forget for ViewSource
impl Freeze for ViewSource
impl Move for ViewSource
impl RefUnwindSafe for ViewSource
impl Send for ViewSource
impl Sync for ViewSourcewhere
RawVecInner: Sync,
impl Unpin for ViewSource
impl UnsafeUnpin for ViewSourcewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
&'static str: UnsafeUnpin,
&'static [(&'static str, &'static [u8])]: UnsafeUnpin,
impl UnwindSafe for ViewSourcewhere
RawVecInner: UnwindSafe,
&'static str: UnwindSafe,
&'static [(&'static str, &'static [u8])]: UnwindSafe,
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<K> ForeignKey<K> for K
impl<K> ForeignKey<K> for K
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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 moreCreates a shared type from an unshared type.