pub struct ExternBlock<Abi, Body> {
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§
§abi: AbiThe ABI chosen. Must be writable
body: BodyThe body of the extern block. Must be writable
Trait Implementations§
Source§impl<Abi, Body> CanHaveAttributes for ExternBlock<Abi, Body>
impl<Abi, Body> CanHaveAttributes for ExternBlock<Abi, Body>
Source§fn with_attributes<Attr>(self, attr: Attr) -> WithAttributes<Attr, Self>
fn with_attributes<Attr>(self, attr: Attr) -> WithAttributes<Attr, Self>
Adds attributes to this writable
Source§impl<Abi: Clone, Body: Clone> Clone for ExternBlock<Abi, Body>
impl<Abi: Clone, Body: Clone> Clone for ExternBlock<Abi, Body>
Source§fn clone(&self) -> ExternBlock<Abi, Body>
fn clone(&self) -> ExternBlock<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 moreAuto Trait Implementations§
impl<Abi, Body> Freeze for ExternBlock<Abi, Body>
impl<Abi, Body> RefUnwindSafe for ExternBlock<Abi, Body>where
Abi: RefUnwindSafe,
Body: RefUnwindSafe,
impl<Abi, Body> Send for ExternBlock<Abi, Body>
impl<Abi, Body> Sync for ExternBlock<Abi, Body>
impl<Abi, Body> Unpin for ExternBlock<Abi, Body>
impl<Abi, Body> UnwindSafe for ExternBlock<Abi, Body>where
Abi: UnwindSafe,
Body: UnwindSafe,
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