pub struct Session { /* private fields */ }Expand description
One editor, driven by tools and by a front end alike, and what a front end keeps of its answers.
Implementations§
Source§impl Session
impl Session
Sourcepub fn read_resource(
&mut self,
uri: &str,
) -> GeopResult<(Contents, &'static str)>
pub fn read_resource( &mut self, uri: &str, ) -> GeopResult<(Contents, &'static str)>
The resource uri, read: what it holds and its media type.
Source§impl Session
impl Session
Sourcepub fn handle(&mut self, command: Command) -> Update
pub fn handle(&mut self, command: Command) -> Update
Applies command, as a front end sends it, keeping what the session
keeps of the answer.
Sourcepub fn handle_json(&mut self, command: &str) -> Result<String, String>
pub fn handle_json(&mut self, command: &str) -> Result<String, String>
Self::handle for a command and an update as JSON.
Auto Trait Implementations§
impl !Freeze for Session
impl !RefUnwindSafe for Session
impl !Send for Session
impl !Sync for Session
impl !UnwindSafe for Session
impl Unpin for Session
impl UnsafeUnpin for Session
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