pub struct Adapter {
pub hello: Hello,
pub language: fn(method: &str, params: Value) -> Option<Answer>,
pub open: fn(params: Value) -> Result<Arc<dyn Session>, Error>,
}Expand description
What a language gives the server to serve.
Fields§
§hello: HelloThe greeting, the same in every process.
language: fn(method: &str, params: Value) -> Option<Answer>Answers a question about text, which needs no session; None for any other method.
open: fn(params: Value) -> Result<Arc<dyn Session>, Error>Creates the session.
Auto Trait Implementations§
impl Forget for Adapter
impl Freeze for Adapter
impl Move for Adapter
impl RefUnwindSafe for Adapter
impl Send for Adapter
impl Sync for Adapter
impl Unpin for Adapter
impl UnsafeUnpin for Adapter
impl UnwindSafe for Adapter
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