pub struct XservSession { /* private fields */ }Expand description
Implementations§
Source§impl XservSession
impl XservSession
Sourcepub fn new(transport: Box<dyn Transport>, options: XservOptions) -> Self
pub fn new(transport: Box<dyn Transport>, options: XservOptions) -> Self
Wrap an open link.
Sourcepub fn into_transport(self) -> Box<dyn Transport>
pub fn into_transport(self) -> Box<dyn Transport>
Give the link back.
Sourcepub fn probe(&mut self, wait: Duration) -> Result<Option<f64>>
pub fn probe(&mut self, wait: Duration) -> Result<Option<f64>>
Send M and wait wait for XSERV’s answer: the free memory, or
None when nothing answers as XSERV does.
Sourcepub fn execute(&mut self, rpl: &str) -> Result<()>
pub fn execute(&mut self, rpl: &str) -> Result<()>
Run RPL text (E); its results stay on the calculator’s stack.
Sourcepub fn quit(&mut self) -> Result<bool>
pub fn quit(&mut self) -> Result<bool>
End XSERV (Q): true when it has ended, false when it still
answers.
Sourcepub fn get(
&mut self,
name: &str,
options: &XmodemOptions,
progress: &mut dyn FnMut(&Event),
) -> Result<XmodemReceived>
pub fn get( &mut self, name: &str, options: &XmodemOptions, progress: &mut dyn FnMut(&Event), ) -> Result<XmodemReceived>
Download name from the current directory.
Sourcepub fn put(
&mut self,
name: &str,
data: &[u8],
options: &XmodemOptions,
progress: &mut dyn FnMut(&Event),
) -> Result<XmodemReport>
pub fn put( &mut self, name: &str, data: &[u8], options: &XmodemOptions, progress: &mut dyn FnMut(&Event), ) -> Result<XmodemReport>
Upload data as name into the current directory.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for XservSession
impl !Sync for XservSession
impl !UnwindSafe for XservSession
impl Forget for XservSession
impl Freeze for XservSession
impl Move for XservSession
impl Send for XservSession
impl Unpin for XservSession
impl UnsafeUnpin for XservSession
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