Skip to content

Commit

Permalink
Add a bunch of documentation to client Session, rearranging functions…
Browse files Browse the repository at this point in the history
… to match order in spec. Do some prep for implementing Register/Unregister nodes
  • Loading branch information
locka99 committed Apr 9, 2019
1 parent 20dddd5 commit 7f2d2f1
Show file tree
Hide file tree
Showing 17 changed files with 862 additions and 615 deletions.
26 changes: 13 additions & 13 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions client/src/callbacks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ impl OnDataChange for DataChangeCallback {

impl DataChangeCallback {
/// Constructs a callback from the supplied function
pub fn new<CB>(cb: CB) -> DataChangeCallback where CB: Fn(Vec<&MonitoredItem>) + Send + Sync + 'static {
DataChangeCallback {
pub fn new<CB>(cb: CB) -> Self where CB: Fn(Vec<&MonitoredItem>) + Send + Sync + 'static {
Self {
cb: Box::new(cb)
}
}
Expand Down Expand Up @@ -77,8 +77,8 @@ impl OnConnectionStatusChange for ConnectionStatusCallback {

impl ConnectionStatusCallback {
// Constructor
pub fn new<CB>(cb: CB) -> ConnectionStatusCallback where CB: FnMut(bool) + Send + Sync + 'static {
ConnectionStatusCallback {
pub fn new<CB>(cb: CB) -> Self where CB: FnMut(bool) + Send + Sync + 'static {
Self {
cb: Box::new(cb)
}
}
Expand All @@ -96,8 +96,8 @@ impl OnSessionClosed for SessionClosedCallback {

impl SessionClosedCallback {
// Constructor
pub fn new<CB>(cb: CB) -> SessionClosedCallback where CB: FnMut(StatusCode) + Send + Sync + 'static {
SessionClosedCallback {
pub fn new<CB>(cb: CB) -> Self where CB: FnMut(StatusCode) + Send + Sync + 'static {
Self {
cb: Box::new(cb)
}
}
Expand Down
Loading

0 comments on commit 7f2d2f1

Please sign in to comment.