pub struct ExternBlock<Attr, Abi, Body> {
pub attr: Attr,
pub abi: Abi,
pub body: Body,
}Expand description
Declaration of an extern block, i.e. for FFI. In Rust 2024 and later, the unsafe keyword must be added for extern blocks. Thus, this struct requires that the context satisfies [ContextProvides] for Edition.
Fields§
§attr: AttrThe attributes. Must be a sequence, and each value will be placed inside #[].
abi: AbiThe ABI chosen. Must be writable
body: BodyThe body of the extern block. Must be writable
Trait Implementations§
Source§impl<Attr: Clone, Abi: Clone, Body: Clone> Clone for ExternBlock<Attr, Abi, Body>
impl<Attr: Clone, Abi: Clone, Body: Clone> Clone for ExternBlock<Attr, Abi, Body>
Source§fn clone(&self) -> ExternBlock<Attr, Abi, Body>
fn clone(&self) -> ExternBlock<Attr, Abi, Body>
Returns a duplicate 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<O, Attr, Abi, Body> Writable<O> for ExternBlock<Attr, Abi, Body>where
O: Output,
O::Ctx: ContextProvides<Edition>,
Attr: WritableSeq<O>,
Abi: Writable<O>,
Body: Writable<O>,
impl<O, Attr, Abi, Body> Writable<O> for ExternBlock<Attr, Abi, Body>where
O: Output,
O::Ctx: ContextProvides<Edition>,
Attr: WritableSeq<O>,
Abi: Writable<O>,
Body: Writable<O>,
Auto Trait Implementations§
impl<Attr, Abi, Body> Freeze for ExternBlock<Attr, Abi, Body>
impl<Attr, Abi, Body> RefUnwindSafe for ExternBlock<Attr, Abi, Body>
impl<Attr, Abi, Body> Send for ExternBlock<Attr, Abi, Body>
impl<Attr, Abi, Body> Sync for ExternBlock<Attr, Abi, Body>
impl<Attr, Abi, Body> Unpin for ExternBlock<Attr, Abi, Body>
impl<Attr, Abi, Body> UnwindSafe for ExternBlock<Attr, Abi, Body>
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