Struct Request

Source
pub struct Request { /* private fields */ }

Implementations§

Source§

impl Request

Source

pub fn new() -> Rc<Self>

Source

pub fn create_with_rpc(rpc: Weak<dyn RpcProto>) -> Rc<Self>

Source

pub fn cmd<'a>(self: &'a Rc<Self>, cmd: impl ToString) -> &'a Rc<Self>

Source

pub fn msg<'a, T>(self: &'a Rc<Self>, msg: T) -> &'a Rc<Self>
where T: Serialize,

Source

pub fn rsp<'a, F, P>(self: &'a Rc<Self>, cb: F) -> &'a Rc<Self>
where P: for<'de> Deserialize<'de>, F: Fn(P) + 'static,

Source

pub fn finally<'a, F>(self: &'a Rc<Self>, finally: F) -> &'a Rc<Self>
where F: Fn(FinallyType) + 'static,

Source

pub fn call(self: &Rc<Self>)

Source

pub fn call_with_rpc(self: &Rc<Self>, rpc: Rc<dyn RpcProto>)

Source

pub fn ping<'a>(self: &'a Rc<Self>) -> &'a Rc<Self>

Source

pub fn timeout_ms<'a>(self: &'a Rc<Self>, timeout_ms: u32) -> &'a Rc<Self>

Source

pub fn timeout<'a, F>(self: &'a Rc<Self>, timeout_cb: F) -> &'a Rc<Self>
where F: Fn() + 'static,

Source

pub fn add_to<'a>(self: &'a Rc<Self>, dispose: &mut Dispose) -> &'a Rc<Self>

Source

pub fn cancel<'a>(self: &'a Rc<Self>) -> &'a Rc<Self>

Source

pub fn reset_cancel<'a>(self: &'a Rc<Self>) -> &'a Rc<Self>

Source

pub fn retry<'a>(self: &'a Rc<Self>, count: i32) -> &'a Rc<Self>

Source

pub fn disable_rsp<'a>(self: &'a Rc<Self>) -> &'a Rc<Self>

Source

pub fn rpc<'a>(self: &'a Rc<Self>, rpc: Weak<dyn RpcProto>) -> &'a Rc<Self>

Source

pub fn get_rpc(&self) -> Option<Weak<dyn RpcProto>>

Source

pub fn is_canceled(&self) -> bool

Source

pub fn canceled<'a>(self: &'a Rc<Self>, canceled: bool) -> &'a Rc<Self>

Source§

impl Request

Source

pub async fn future<R>(self: &Rc<Self>) -> FutureRet<R>
where R: for<'de> Deserialize<'de> + 'static,

Auto Trait Implementations§

§

impl !Freeze for Request

§

impl !RefUnwindSafe for Request

§

impl !Send for Request

§

impl !Sync for Request

§

impl Unpin for Request

§

impl !UnwindSafe for Request

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.