Skip to content

Commit

Permalink
Add OwningHandle::{owner, into_inner}
Browse files Browse the repository at this point in the history
  • Loading branch information
gyscos committed Jan 10, 2018
1 parent e07ee21 commit 438a12b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -855,6 +855,16 @@ impl<O, H> OwningHandle<O, H>
_owner: o,
})
}

/// A getter for the underlying owner.
pub fn owner(&self) -> &O {
&self._owner
}

/// Discards the dependent object and returns the owner.
pub fn into_inner(self) -> O {
self._owner
}
}

/////////////////////////////////////////////////////////////////////////////
Expand Down

0 comments on commit 438a12b

Please sign in to comment.