pub struct SyncClient {
pub server_url: String,
/* private fields */
}Expand description
Best-effort sync client that pushes local DB writes to a remote santui-server.
Fields§
§server_url: StringImplementations§
Source§impl SyncClient
impl SyncClient
pub fn new(server_url: String) -> Self
Sourcepub fn try_sync(&self, auth: &Option<Arc<dyn AuthHandle>>)
pub fn try_sync(&self, auth: &Option<Arc<dyn AuthHandle>>)
Attempt to sync all pending operations to the server.
If no JWT is cached, tries to authenticate using the provided auth handle’s bearer token. Failures are logged — ops stay queued for the next call.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for SyncClient
impl RefUnwindSafe for SyncClient
impl Send for SyncClient
impl Sync for SyncClient
impl Unpin for SyncClient
impl UnsafeUnpin for SyncClient
impl UnwindSafe for SyncClient
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more