@@ -30,7 +30,7 @@ impl Database {
3030 Ref :: new ( Self { handle } )
3131 }
3232
33- /// Get a snapshot by its id , or None if no snapshot with that id exists
33+ /// Get a [`Snapshot`] by its `id` , or ` None` if no snapshot with that `id` exists.
3434 pub fn snapshot_by_id ( & self , id : SnapshotId ) -> Option < Ref < Snapshot > > {
3535 let result = unsafe { BNGetDatabaseSnapshot ( self . handle . as_ptr ( ) , id. 0 ) } ;
3636 NonNull :: new ( result) . map ( |handle| unsafe { Snapshot :: ref_from_raw ( handle) } )
@@ -113,8 +113,9 @@ impl Database {
113113 SnapshotId ( new_id)
114114 }
115115
116- /// Trim a snapshot's contents in the database by id, but leave the parent/child
117- /// hierarchy intact. Future references to this snapshot will return False for has_contents
116+ /// Trim a snapshot's contents in the database but leave the parent/child hierarchy intact.
117+ ///
118+ /// NOTE: Future references to this snapshot will return `false` for [`Database::snapshot_has_data`]
118119 pub fn trim_snapshot ( & self , id : SnapshotId ) -> Result < ( ) , ( ) > {
119120 if unsafe { BNTrimDatabaseSnapshot ( self . handle . as_ptr ( ) , id. 0 ) } {
120121 Ok ( ( ) )
@@ -193,6 +194,7 @@ impl Database {
193194 unsafe { KeyValueStore :: ref_from_raw ( NonNull :: new ( result) . unwrap ( ) ) }
194195 }
195196
197+ /// Closes then reopens the database.
196198 pub fn reload_connection ( & self ) {
197199 unsafe { BNDatabaseReloadConnection ( self . handle . as_ptr ( ) ) }
198200 }
0 commit comments