Struct DocumentHistory
pub struct DocumentHistory { /* private fields */ }Expand description
Lazy history paging state for every artifact the app has seen.
Implementations§
§impl DocumentHistory
impl DocumentHistory
pub fn observe_live(&mut self, artifact: ArtifactId, seq: u64)
pub fn observe_live(&mut self, artifact: ArtifactId, seq: u64)
Note an op that arrived live (or as the joining snapshot).
pub fn on_viewport(
&mut self,
artifact: ArtifactId,
loaded_ops_above_viewport: usize,
) -> Option<CollabRequest>
pub fn on_viewport( &mut self, artifact: ArtifactId, loaded_ops_above_viewport: usize, ) -> Option<CollabRequest>
A history view reports how many loaded ops lie above its viewport; returns the fetch to send when it nears the loaded edge.
pub fn ensure_loaded_back_to(
&mut self,
artifact: ArtifactId,
seq: u64,
) -> Option<CollabRequest>
pub fn ensure_loaded_back_to( &mut self, artifact: ArtifactId, seq: u64, ) -> Option<CollabRequest>
Something needs history back to seq (an older version, a search
hit); returns the first fetch. Later pages follow from
Self::on_batch until seq is loaded.
pub fn on_batch(
&mut self,
artifact: ArtifactId,
oldest_seq: Option<u64>,
exhausted: bool,
) -> Option<CollabRequest>
pub fn on_batch( &mut self, artifact: ArtifactId, oldest_seq: Option<u64>, exhausted: bool, ) -> Option<CollabRequest>
Record a scrollback batch; returns the follow-up fetch, if a target is not reached yet.
pub fn pager_for(&self, artifact: ArtifactId) -> Option<&HistoryPager>
pub fn pager_for(&self, artifact: ArtifactId) -> Option<&HistoryPager>
Paging state for artifact, if any history was requested.
pub fn reset_in_flight(&mut self)
pub fn reset_in_flight(&mut self)
Forget outstanding requests after a transport reset.
Trait Implementations§
§impl Debug for DocumentHistory
impl Debug for DocumentHistory
§impl Default for DocumentHistory
impl Default for DocumentHistory
§fn default() -> DocumentHistory
fn default() -> DocumentHistory
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DocumentHistory
impl RefUnwindSafe for DocumentHistory
impl Send for DocumentHistory
impl Sync for DocumentHistory
impl Unpin for DocumentHistory
impl UnsafeUnpin for DocumentHistory
impl UnwindSafe for DocumentHistory
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 more§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.