pub struct ExternDecl {
pub docs: Vec<Doc>,
pub public: bool,
pub kind: ExternDeclKind,
pub from: StrLit,
pub span: Span,
pub native: Option<NativeSig>,
pub native_fields: Vec<(String, NativeTy)>,
}Expand description
A declaration inside an extern target block.
Fields§
§docs: Vec<Doc>Doc comments.
public: boolpub
kind: ExternDeclKindFunction or type.
from: StrLitThe target path after from.
span: SpanThe whole declaration.
native: Option<NativeSig>For a function of a native module (spec chapter 7, section 8.7): the Rust types of its
parameters and result as the reader found them. None for written declarations.
native_fields: Vec<(String, NativeTy)>For a record of a native module (spec chapter 8, section 8a): the name in the target code and the type the reader found of each field, in order. Empty for written declarations.
Trait Implementations§
Source§impl Clone for ExternDecl
impl Clone for ExternDecl
Source§impl Debug for ExternDecl
impl Debug for ExternDecl
Source§impl PartialEq for ExternDecl
impl PartialEq for ExternDecl
impl StructuralPartialEq for ExternDecl
Auto Trait Implementations§
impl Freeze for ExternDecl
impl RefUnwindSafe for ExternDecl
impl Send for ExternDecl
impl Sync for ExternDecl
impl Unpin for ExternDecl
impl UnsafeUnpin for ExternDecl
impl UnwindSafe for ExternDecl
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