pub struct Server { /* private fields */ }Implementations§
Source§impl Server
impl Server
pub fn new( store: Arc<dyn Store>, checkpoint_freq: Duration, authenticator: Option<Arc<dyn Authenticator>>, cancellation_token: CancellationToken, doc_gc: bool, port: u16, ) -> Self
pub async fn start(port: u16) -> Result<()>
pub async fn get_or_create_doc( &self, doc_id: &str, ) -> Result<MappedRef<'_, String, DocWithSyncKv, DocWithSyncKv>>
Trait Implementations§
Source§impl DocServer for Server
impl DocServer for Server
fn fetch<'life0, 'life1, 'async_trait>(
&'life0 self,
doc_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Arc<RwLock<Awareness>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn authenticate<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
doc_id: &'life1 str,
token: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<DocConnectionConfig>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Auto Trait Implementations§
impl Freeze for Server
impl !RefUnwindSafe for Server
impl Send for Server
impl Sync for Server
impl Unpin for Server
impl !UnwindSafe for Server
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more