pub struct ModDeclaration {
pub name: String,
pub line: usize,
}Expand description
A mod foo; or mod foo { ... } declaration in a Rust file.
Fields§
§name: StringName of the declared module (e.g. "config", "tests").
line: usize1-indexed source line of the mod keyword.
Trait Implementations§
Source§impl Clone for ModDeclaration
impl Clone for ModDeclaration
Source§fn clone(&self) -> ModDeclaration
fn clone(&self) -> ModDeclaration
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 ModDeclaration
impl Debug for ModDeclaration
Source§impl<'de> Deserialize<'de> for ModDeclaration
impl<'de> Deserialize<'de> for ModDeclaration
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 PartialEq for ModDeclaration
impl PartialEq for ModDeclaration
Source§fn eq(&self, other: &ModDeclaration) -> bool
fn eq(&self, other: &ModDeclaration) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ModDeclaration
impl Serialize for ModDeclaration
impl Eq for ModDeclaration
impl StructuralPartialEq for ModDeclaration
Auto Trait Implementations§
impl Freeze for ModDeclaration
impl RefUnwindSafe for ModDeclaration
impl Send for ModDeclaration
impl Sync for ModDeclaration
impl Unpin for ModDeclaration
impl UnsafeUnpin for ModDeclaration
impl UnwindSafe for ModDeclaration
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