pub struct Server { /* private fields */ }Implementations§
Source§impl Server
impl Server
pub async fn new( store: Option<Box<dyn Store>>, checkpoint_freq: Duration, authenticator: Option<Authenticator>, url_prefix: Option<Url>, cancellation_token: CancellationToken, doc_gc: bool, max_body_size: Option<usize>, ) -> Result<Self>
pub async fn doc_exists(&self, doc_id: &str) -> bool
pub async fn create_doc(&self) -> Result<String>
pub async fn load_doc(&self, doc_id: &str) -> Result<()>
pub async fn get_or_create_doc( &self, doc_id: &str, ) -> Result<MappedRef<'_, String, DocWithSyncKv, DocWithSyncKv>>
pub fn check_auth( &self, auth_header: Option<TypedHeader<Authorization<Bearer>>>, ) -> Result<(), AppError>
pub async fn redact_error_middleware( req: Request, next: Next, ) -> impl IntoResponse
pub fn routes(self: &Arc<Self>) -> Router
pub fn single_doc_routes(self: &Arc<Self>) -> Router
pub async fn serve( self, listener: TcpListener, redact_errors: bool, ) -> Result<()>
pub async fn serve_doc( self, listener: TcpListener, redact_errors: bool, ) -> Result<()>
Auto Trait Implementations§
impl !RefUnwindSafe for Server
impl !UnwindSafe for Server
impl Freeze for Server
impl Send for Server
impl Sync for Server
impl Unpin for Server
impl UnsafeUnpin 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