add pub LoroDoc::peer_id (#267)

Co-authored-by: Gentle <ramon.klass@gmail.com>
This commit is contained in:
Gentle 2024-02-15 18:45:16 +01:00 committed by GitHub
parent 269e944ed8
commit 68117070dd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -239,6 +239,11 @@ impl LoroDoc {
self.doc.state_frontiers()
}
/// Get the PeerID
pub fn peer_id(&self) -> PeerID {
self.doc.peer_id()
}
/// Change the PeerID
///
/// NOTE: You need ot make sure there is no chance two peer have the same PeerID.