pub struct StateHandle<P: Platform> {
pub manager: Arc<Mutex<Manager>>,
pub options: Arc<Options<P>>,
pub platform: PlatformExt<P>,
/* private fields */
}
Fields§
§manager: Arc<Mutex<Manager>>
§options: Arc<Options<P>>
§platform: PlatformExt<P>
Implementations§
source§impl<P: Platform> StateHandle<P>
impl<P: Platform> StateHandle<P>
sourcepub async fn commit_and_send(
&self,
cursors: &mut [Cursor<'_>],
) -> Result<(), ApplicationError>
pub async fn commit_and_send( &self, cursors: &mut [Cursor<'_>], ) -> Result<(), ApplicationError>
Commit and send our changes.
This also pulls the changes from others to the current
storage.
The cursors
are a list of byte-index positions in the resources where you have cursors
(read: text-editing cursors). After calling this function, their Cursor::index
are
modified according to the changes from your piers. This means your user’s cursor changes
position when pulling changes, to the logically same place, even if edits happened above in
the document.
sourcepub fn abort_tasks(&self)
pub fn abort_tasks(&self)
Abort all running tasks set up by agde.
This disabled listening for new messages, committing our changes, resolving the fast forward, and periodic events such as flushing and log checks.
Use this when implementing shutdown.
Trait Implementations§
source§impl<P: Clone + Platform> Clone for StateHandle<P>
impl<P: Clone + Platform> Clone for StateHandle<P>
source§fn clone(&self) -> StateHandle<P>
fn clone(&self) -> StateHandle<P>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<P> Freeze for StateHandle<P>where
P: Freeze,
impl<P> !RefUnwindSafe for StateHandle<P>
impl<P> Send for StateHandle<P>
impl<P> Sync for StateHandle<P>
impl<P> Unpin for StateHandle<P>where
P: Unpin,
impl<P> !UnwindSafe for StateHandle<P>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)