Add more documentation to collab
(#4095)
This PR adds more documentation to the `collab` crate. Release Notes: - N/A --------- Co-authored-by: Conrad <conrad@zed.dev>
This commit is contained in:
parent
4e4a1e0dd1
commit
cf5dc099fb
15 changed files with 219 additions and 5 deletions
|
@ -9,6 +9,8 @@ pub struct LeftChannelBuffer {
|
|||
}
|
||||
|
||||
impl Database {
|
||||
/// Open a channel buffer. Returns the current contents, and adds you to the list of people
|
||||
/// to notify on changes.
|
||||
pub async fn join_channel_buffer(
|
||||
&self,
|
||||
channel_id: ChannelId,
|
||||
|
@ -121,6 +123,7 @@ impl Database {
|
|||
.await
|
||||
}
|
||||
|
||||
/// Rejoin a channel buffer (after a connection interruption)
|
||||
pub async fn rejoin_channel_buffers(
|
||||
&self,
|
||||
buffers: &[proto::ChannelBufferVersion],
|
||||
|
@ -232,6 +235,7 @@ impl Database {
|
|||
.await
|
||||
}
|
||||
|
||||
/// Clear out any buffer collaborators who are no longer collaborating.
|
||||
pub async fn clear_stale_channel_buffer_collaborators(
|
||||
&self,
|
||||
channel_id: ChannelId,
|
||||
|
@ -274,6 +278,7 @@ impl Database {
|
|||
.await
|
||||
}
|
||||
|
||||
/// Close the channel buffer, and stop receiving updates for it.
|
||||
pub async fn leave_channel_buffer(
|
||||
&self,
|
||||
channel_id: ChannelId,
|
||||
|
@ -286,6 +291,7 @@ impl Database {
|
|||
.await
|
||||
}
|
||||
|
||||
/// Close the channel buffer, and stop receiving updates for it.
|
||||
pub async fn channel_buffer_connection_lost(
|
||||
&self,
|
||||
connection: ConnectionId,
|
||||
|
@ -309,6 +315,7 @@ impl Database {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
/// Close all open channel buffers
|
||||
pub async fn leave_channel_buffers(
|
||||
&self,
|
||||
connection: ConnectionId,
|
||||
|
@ -342,7 +349,7 @@ impl Database {
|
|||
.await
|
||||
}
|
||||
|
||||
pub async fn leave_channel_buffer_internal(
|
||||
async fn leave_channel_buffer_internal(
|
||||
&self,
|
||||
channel_id: ChannelId,
|
||||
connection: ConnectionId,
|
||||
|
@ -798,6 +805,7 @@ impl Database {
|
|||
Ok(changes)
|
||||
}
|
||||
|
||||
/// Returns the latest operations for the buffers with the specified IDs.
|
||||
pub async fn get_latest_operations_for_buffers(
|
||||
&self,
|
||||
buffer_ids: impl IntoIterator<Item = BufferId>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue