Skip to main content

RpcBuilder

Struct RpcBuilder 

pub struct RpcBuilder<'c, C>
where C: GodotClass,
{ /* private fields */ }
Expand description

Pending type-safe RPC call, holding the target object, RPC name and arguments until the call is dispatched.

You generally do not construct this directly. It is returned by the per-RPC methods on the collection from WithUserRpcs::rpcs() (or Gd::rpcs()). Finalize the call with call() to broadcast, or call_id() to target a specific peer.

Implementations§

§

impl<'c, C> RpcBuilder<'c, C>
where C: GodotClass,

pub fn new( object: UserRpcObject<'c, C>, rpc_name: &'c str, arguments: Vec<Variant>, ) -> RpcBuilder<'c, C>

§

impl<'c, C> RpcBuilder<'c, C>

pub fn call(self) -> Result<(), RpcError>

pub fn call_id(self, id: i64) -> Result<(), RpcError>

Auto Trait Implementations§

§

impl<'c, C> !Send for RpcBuilder<'c, C>

§

impl<'c, C> !Sync for RpcBuilder<'c, C>

§

impl<'c, C> !UnwindSafe for RpcBuilder<'c, C>

§

impl<'c, C> Freeze for RpcBuilder<'c, C>
where <<C as Bounds>::Declarer as Declarer>::InstanceCache: Freeze,

§

impl<'c, C> RefUnwindSafe for RpcBuilder<'c, C>
where C: RefUnwindSafe,

§

impl<'c, C> Unpin for RpcBuilder<'c, C>
where <<C as Bounds>::Declarer as Declarer>::InstanceCache: Unpin,

§

impl<'c, C> UnsafeUnpin for RpcBuilder<'c, C>
where <<C as Bounds>::Declarer as Declarer>::InstanceCache: UnsafeUnpin,

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

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

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

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

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.