pub struct Declaration<P: Phase = Raw> {
pub attributes: Vec<Attribute>,
pub kind: DeclKind<P>,
pub span: Span,
}Expand description
A top-level declaration.
Fields§
§attributes: Vec<Attribute>§kind: DeclKind<P>§span: SpanTrait Implementations§
Source§impl<P: Clone + Phase> Clone for Declaration<P>
impl<P: Clone + Phase> Clone for Declaration<P>
Source§fn clone(&self) -> Declaration<P>
fn clone(&self) -> Declaration<P>
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 FormatEquivalent for Declaration
impl FormatEquivalent for Declaration
Source§fn format_equivalent(&self, other: &Self) -> bool
fn format_equivalent(&self, other: &Self) -> bool
Returns
true if self and other are equivalent up to formatting.Auto Trait Implementations§
impl<P> Freeze for Declaration<P>
impl<P> RefUnwindSafe for Declaration<P>
impl<P> Send for Declaration<P>
impl<P> Sync for Declaration<P>
impl<P> Unpin for Declaration<P>
impl<P> UnsafeUnpin for Declaration<P>
impl<P> UnwindSafe for Declaration<P>
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