pub struct SourceItemOrderingModuleItemGroupings {
groups: Vec<(String, Vec<SourceItemOrderingModuleItemKind>)>,
lut: HashMap<SourceItemOrderingModuleItemKind, usize>,
}
Expand description
Represents the configured ordering of items within a module.
The Deserialize
implementation checks that no item kinds have been
omitted and that there are no duplicates in the user configuration.
Fields§
§groups: Vec<(String, Vec<SourceItemOrderingModuleItemKind>)>
§lut: HashMap<SourceItemOrderingModuleItemKind, usize>
Implementations§
Source§impl SourceItemOrderingModuleItemGroupings
impl SourceItemOrderingModuleItemGroupings
fn build_lut( groups: &[(String, Vec<SourceItemOrderingModuleItemKind>)], ) -> HashMap<SourceItemOrderingModuleItemKind, usize>
pub fn module_level_order_of( &self, item: &SourceItemOrderingModuleItemKind, ) -> Option<usize>
Trait Implementations§
Source§impl Clone for SourceItemOrderingModuleItemGroupings
impl Clone for SourceItemOrderingModuleItemGroupings
Source§fn clone(&self) -> SourceItemOrderingModuleItemGroupings
fn clone(&self) -> SourceItemOrderingModuleItemGroupings
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'de> Deserialize<'de> for SourceItemOrderingModuleItemGroupings
impl<'de> Deserialize<'de> for SourceItemOrderingModuleItemGroupings
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&[(&str, &[SourceItemOrderingModuleItemKind])]> for SourceItemOrderingModuleItemGroupings
impl From<&[(&str, &[SourceItemOrderingModuleItemKind])]> for SourceItemOrderingModuleItemGroupings
Source§fn from(value: &[(&str, &[SourceItemOrderingModuleItemKind])]) -> Self
fn from(value: &[(&str, &[SourceItemOrderingModuleItemKind])]) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SourceItemOrderingModuleItemGroupings
impl RefUnwindSafe for SourceItemOrderingModuleItemGroupings
impl Send for SourceItemOrderingModuleItemGroupings
impl Sync for SourceItemOrderingModuleItemGroupings
impl Unpin for SourceItemOrderingModuleItemGroupings
impl UnwindSafe for SourceItemOrderingModuleItemGroupings
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 moreimpl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 72 bytes