There are many API changes from 0.9 to 0.10 and most probably you'll need to migrate your code. This is the summary of breaking changes:
- the crate uses
edition = "2018"
thus requiringrust-1.31
Connection
consumesContext
on creation and releases it onconnect_*()
, allows to avoid usingArc
and provides more safety- type signatures for
Connection
,Context
have an additional lifetime arg Connection::context()
is removed, context is now passed as the first argument to a callbackConnection
andLogger
own the callbacks supplied to them, passing closure references is still possible, all callbacks must beSend
Connection::*handler_add()
return special handles used to remove callbacks laterConnection::*handler_delete()
take special handles returned fromConnection::*handler_add()
and not callback referencesContext
implements memory allocation through Rust allocatorContext::set_timeout()
takes &mut self instead of &self- the crate uses failure instead of error-chain
StreamError
no longer implementsstd::error::Error
Stanza::context()
is no longer accessible publiclyStanza::get_first_child_mut()
takes &mut self instead of &self