pub struct InterfaceBuilder<'a> { /* private fields */ }
Implementations§
Source§impl<'a> InterfaceBuilder<'a>
impl<'a> InterfaceBuilder<'a>
pub fn begin_callback<T: IntoName, D: Into<Doc<Unvalidated>>>( self, name: T, doc: D, ) -> BindResult<CallbackFunctionBuilder<'a>>
Sourcepub fn build_sync(self) -> BindResult<SynchronousInterface>
pub fn build_sync(self) -> BindResult<SynchronousInterface>
Build the interface and mark it as only used in a synchronous context.
A synchronous interface is one that is invoked only during a function call which
takes it as an argument. The Rust backend will NOT generate Send
and Sync
implementations so that it be cannot be transferred across thread boundaries.
Sourcepub fn build_async(self) -> BindResult<AsynchronousInterface>
pub fn build_async(self) -> BindResult<AsynchronousInterface>
Build the interface and mark it as used in an asynchronous context.
An asynchronous interface is one that is invoked some time after it is
passed as a function argument. The Rust backend will mark the C representation
of this interface as Send
and Sync
so that it be transferred across thread
boundaries.
Auto Trait Implementations§
impl<'a> Freeze for InterfaceBuilder<'a>
impl<'a> RefUnwindSafe for InterfaceBuilder<'a>
impl<'a> !Send for InterfaceBuilder<'a>
impl<'a> !Sync for InterfaceBuilder<'a>
impl<'a> Unpin for InterfaceBuilder<'a>
impl<'a> !UnwindSafe for InterfaceBuilder<'a>
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