pub struct CanvasStore { /* private fields */ }Implementations§
Source§impl CanvasStore
impl CanvasStore
pub fn new(document: CanvasDocument) -> Self
pub fn new_with_router<R>(document: CanvasDocument, edge_router: R) -> Self
pub fn try_new_with_kind_registry( document: CanvasDocument, kind_registry: CanvasKindRegistry, ) -> Result<Self, DocumentError>
pub fn try_new_with_router_and_kind_registry<R>( document: CanvasDocument, edge_router: R, kind_registry: CanvasKindRegistry, ) -> Result<Self, DocumentError>
pub fn document(&self) -> &CanvasDocument
pub fn runtime(&self) -> &CanvasRuntime
pub fn edge_router(&self) -> &(dyn CanvasEdgeRouter + Send + Sync)
pub fn kind_registry(&self) -> &CanvasKindRegistry
pub fn history(&self) -> &CanvasHistory
pub fn listen( &mut self, listener: impl Fn(&CanvasStoreChange) + Send + Sync + 'static, ) -> CanvasStoreListenerId
pub fn remove_listener(&mut self, id: CanvasStoreListenerId) -> bool
pub fn apply_transaction( &mut self, transaction: CanvasTransaction, ) -> Result<CanvasDocumentDiff, DocumentError>
pub fn commit_transaction( &mut self, transaction: CanvasTransaction, ) -> Result<Option<CanvasStoreChange>, DocumentError>
pub fn undo(&mut self) -> Result<bool, DocumentError>
pub fn redo(&mut self) -> Result<bool, DocumentError>
pub fn rebuild_runtime(&mut self)
pub fn set_edge_router<R>(&mut self, edge_router: R)
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for CanvasStore
impl !UnwindSafe for CanvasStore
impl Freeze for CanvasStore
impl Send for CanvasStore
impl Sync for CanvasStore
impl Unpin for CanvasStore
impl UnsafeUnpin for CanvasStore
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().