Struct Client

#[repr(C)]
pub struct Client { pub(in ::bridge) run: extern "C" fn(BridgeConfig<'_>) -> Buffer }

A client-side RPC entry-point, which may be using a different proc_macro from the one used by the server, but can be invoked compatibly.

Note that the input and output type parameters are erased. They do not participate in the ABI, so while using the wrong runN method will likely result in a panic, it will not result in UB.

Fields

run: extern "C" fn(BridgeConfig<'_>) -> Buffer

Implementations

impl Client

const fn expand1(f: impl Fn(TokenStream) -> TokenStream + Copy) -> Self
const fn expand2(f: impl Fn(TokenStream, TokenStream) -> TokenStream + Copy) -> Self

impl Client

fn run1<S>(&self, strategy: &impl ExecutionStrategy, server: S, input: S::TokenStream, force_show_panics: bool) -> Result<S::TokenStream, PanicMessage>
where
    S: Server,
fn run2<S>(&self, strategy: &impl ExecutionStrategy, server: S, input: S::TokenStream, input2: S::TokenStream, force_show_panics: bool) -> Result<S::TokenStream, PanicMessage>
where
    S: Server,

Trait Implementations

impl Clone for Client

fn clone(&self) -> Client

impl Copy for Client

impl TrivialClone for Client

Auto Trait Implementations

impl Freeze for Client

impl RefUnwindSafe for Client

impl Send for Client

impl Sync for Client

impl Unpin for Client

impl UnsafeUnpin for Client

impl UnwindSafe for Client

Blanket Implementations

impl<T> Any for Client where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for Client where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for Client where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> CloneToUninit for Client where T: Clone,

unsafe fn clone_to_uninit(&self, dest: *mut u8)

impl<T> From<T> for Client

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> SizeHint for Client where T: ?Sized,

fn lower_bound(&self) -> usize
fn upper_bound(&self) -> Option<usize>

impl<T> SizedTypeProperties for Client

impl<T> ToOwned for Client where T: Clone,

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

impl<T, U> Into<U> for Client where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for Client where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for Client where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>