pub enum NamespaceRule {
Literal(Cow<'static, str>),
File,
FileRelative,
Folder,
FolderRelative,
}Expand description
Namespace selection rules for FTL file output.
Variants§
Literal(Cow<'static, str>)
A literal namespace string.
File
Use the source file name (stem only) as the namespace.
FileRelative
Use the file path relative to the crate root as the namespace.
Folder
Use the source file parent folder name as the namespace.
FolderRelative
Use the source file parent folder path relative to crate root as the namespace.
Implementations§
Trait Implementations§
Source§impl Clone for NamespaceRule
impl Clone for NamespaceRule
Source§fn clone(&self) -> NamespaceRule
fn clone(&self) -> NamespaceRule
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 NamespaceRule
impl Debug for NamespaceRule
Source§impl FromMeta for NamespaceRule
impl FromMeta for NamespaceRule
Source§fn from_meta(item: &Meta) -> Result<Self>
fn from_meta(item: &Meta) -> Result<Self>
Create an instance from a
syn::Meta by dispatching to the format-appropriate
trait function. This generally should not be overridden by implementers. Read morefn from_nested_meta(item: &NestedMeta) -> Result<Self, Error>
Source§fn from_none() -> Option<Self>
fn from_none() -> Option<Self>
When a field is omitted from a parent meta-item,
from_none is used to attempt
recovery before a missing field error is generated. Read moreSource§fn from_word() -> Result<Self, Error>
fn from_word() -> Result<Self, Error>
Create an instance from the presence of the word in the attribute with no
additional options specified.
Source§fn from_list(items: &[NestedMeta]) -> Result<Self, Error>
fn from_list(items: &[NestedMeta]) -> Result<Self, Error>
Create an instance from a list of nested meta items.
Source§fn from_value(value: &Lit) -> Result<Self, Error>
fn from_value(value: &Lit) -> Result<Self, Error>
Create an instance from a literal value of either
foo = "bar" or foo("bar").
This dispatches to the appropriate method based on the type of literal encountered,
and generally should not be overridden by implementers. Read morefn from_expr(expr: &Expr) -> Result<Self, Error>
Source§fn from_char(value: char) -> Result<Self, Error>
fn from_char(value: char) -> Result<Self, Error>
Create an instance from a char literal in a value position.
Source§impl Hash for NamespaceRule
impl Hash for NamespaceRule
Source§impl PartialEq for NamespaceRule
impl PartialEq for NamespaceRule
Source§fn eq(&self, other: &NamespaceRule) -> bool
fn eq(&self, other: &NamespaceRule) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for NamespaceRule
impl StructuralPartialEq for NamespaceRule
Auto Trait Implementations§
impl Freeze for NamespaceRule
impl RefUnwindSafe for NamespaceRule
impl Send for NamespaceRule
impl Sync for NamespaceRule
impl Unpin for NamespaceRule
impl UnsafeUnpin for NamespaceRule
impl UnwindSafe for NamespaceRule
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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