pub enum FileNameCase {
SnakeCase,
PascalCase,
}Expand description
Which convention the file-name rule holds a file to.
The style guide says snake_case and that is the default. It is also the one naming rule where a project’s own answer is worth honouring rather than suppressing: a file name is not an identifier the language sees, so a project that names files after the classes in them is following a convention rather than breaking one. Saying which is being followed keeps the rule working, where disabling it stops it noticing anything at all.
Both settings are a convention by name, not a pattern to match. The
alternative — a regular expression, as gdtoolkit takes — makes every
project’s spelling of “snake_case” subtly its own. See docs/DESIGN.md.
Variants§
SnakeCase
player_controller.gd, what the guide asks for.
PascalCase
PlayerController.gd, matching the class the file holds.
Trait Implementations§
Source§impl Clone for FileNameCase
impl Clone for FileNameCase
Source§fn clone(&self) -> FileNameCase
fn clone(&self) -> FileNameCase
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for FileNameCase
Source§impl Debug for FileNameCase
impl Debug for FileNameCase
Source§impl Default for FileNameCase
impl Default for FileNameCase
Source§fn default() -> FileNameCase
fn default() -> FileNameCase
impl Eq for FileNameCase
Source§impl PartialEq for FileNameCase
impl PartialEq for FileNameCase
impl StructuralPartialEq for FileNameCase
Auto Trait Implementations§
impl Freeze for FileNameCase
impl RefUnwindSafe for FileNameCase
impl Send for FileNameCase
impl Sync for FileNameCase
impl Unpin for FileNameCase
impl UnsafeUnpin for FileNameCase
impl UnwindSafe for FileNameCase
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.