pub struct Cx { /* private fields */ }Expand description
What a call may ask of Escouade while it runs.
Implementations§
Source§impl Cx
impl Cx
Sourcepub async fn request(
&self,
method: &str,
params: Value,
) -> Result<Value, Refusal>
pub async fn request( &self, method: &str, params: Value, ) -> Result<Value, Refusal>
Asks Escouade method: its result, or its refusal (one that does not come back: Escouade closed).
Sourcepub async fn secret(&self, key: &str) -> Result<Option<String>, Refusal>
pub async fn secret(&self, key: &str) -> Result<Option<String>, Refusal>
The secret key of the plugin (permissions.secrets): none when Escouade keeps none.
Auto Trait Implementations§
impl !Freeze for Cx
impl !RefUnwindSafe for Cx
impl !UnwindSafe for Cx
impl Send for Cx
impl Sync for Cx
impl Unpin for Cx
impl UnsafeUnpin for Cx
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