pub enum NotesEvent {
Show 41 variants
Created {
note: Note,
},
Note {
note: Note,
},
Rows {
items: Vec<NotesEvent>,
},
Page {
next: Option<String>,
remaining: u64,
},
Saved {
id: String,
revision: u32,
at: i64,
by: String,
stale: bool,
},
Applied {
id: String,
revision: u32,
},
State {
id: String,
update: String,
vector: String,
revision: u32,
},
Updated {
id: String,
seq: u32,
update: String,
at: i64,
by: String,
session: Option<String>,
note: Option<Note>,
},
Renamed {
id: String,
title: String,
revision: u32,
at: i64,
by: String,
note: Option<Note>,
},
Deleted {
id: String,
at: i64,
by: String,
},
Squashed {
id: String,
until: u32,
removed: u32,
at: i64,
by: String,
},
Change {
change: HistoryRow,
},
Present {
present: Present,
},
Left {
id: String,
session: String,
client: Option<u64>,
},
Thread {
thread: Thread,
},
Asked {
thread: Thread,
},
Replied {
thread: Thread,
},
Resolved {
thread: Thread,
},
Mark {
mark: Mark,
},
Marked {
mark: Mark,
},
Unmarked {
id: String,
mark: String,
},
MarkChanged {
id: String,
mark: Mark,
},
MarkRemoved {
id: String,
mark: String,
},
Text {
id: String,
revision: u32,
body: String,
by: String,
at: i64,
},
May {
id: String,
role: Role,
held: bool,
},
Watching {
id: Option<String>,
},
Lagged {
missed: u64,
},
WatchClosed {
reason: WatchEnd,
message: String,
},
NotFound {
id: Option<String>,
revision: Option<u32>,
org: Option<String>,
thread: Option<String>,
mark: Option<String>,
},
Refused {
reason: String,
message: String,
},
Slot {
slot: Slot,
},
Filled {
slot: Slot,
},
Emptied {
slot: Slot,
},
Building {
slot: Slot,
},
Props {
slot: Slot,
},
SlotChanged {
id: String,
slot: Slot,
},
BuildingChanged {
id: String,
building: Option<Building>,
slot: Slot,
},
PropsChanged {
id: String,
props: Map<String, Value>,
by: String,
slot: Slot,
},
Usage {
principal: String,
count: u64,
bytes: u64,
},
UsageDay {
principal: String,
day: i64,
count: u64,
bytes: u64,
},
Error {
message: String,
},
}Expand description
What the notes service streams.
Variants§
Created
create’s answer, and a watch’s word for a note made.
Note
get’s and replay’s answer: the note whole (as it stood then, for a replay).
Rows
A page of list’s rows at once: each item a note { note } without its body.
Fields
items: Vec<NotesEvent>Page
Where a list walk stands, the last data event of the call: next is the
cursor to pass as the next call’s after (null when nothing more
matches); remaining counts the matches past this page.
Saved
save’s and restore’s answer: the body merged in as the CRDT’s own
edits — the revision it made (none new when it changed nothing), when and
by whom; stale when base was not the revision it found.
Applied
update’s answer: the update kept as change revision.
State
state’s answer: what the caller’s state vector lacks (update, a Yjs v1
update, base64), the note’s own state vector (vector, base64), and
its revision.
Updated
A watch’s word for every change of the body: the Yjs v1 update (base64) to
apply, its seq, who and when, the presence session it came from when it
said; note the note as it is now (without its body on a watch of every
note).
Fields
Renamed
rename’s answer, and a watch’s: the new title and the revision it made.
Deleted
delete’s answer, and a watch’s: the note is gone (its changes are kept in the file).
Squashed
squash’s answer, and a watch’s: the changes up to until are one
snapshot now (removed rows fewer), who wrote what kept as its authors.
Change
history’s rows, newest first.
Fields
change: HistoryRowPresent
present’s rows, and a watch’s word: someone is on the note, or moved their caret.
Left
A watch’s word: someone left the note (client their Yjs client id, when said).
Thread
V2-30: threads’ and waiting’s rows, a thread whole.
Asked
V2-30: ask’s answer, and a watch’s: a question asked on a range.
Replied
V2-30: reply’s answer, and a watch’s: the thread with its new answer.
Resolved
V2-30: resolve’s answer, and a watch’s: the thread folded (or opened again: resolved absent).
Mark
NOTES-5: marks’ rows, a mark whole.
Marked
NOTES-5: mark’s answer: the mark made, or changed.
Unmarked
NOTES-5: unmark’s answer: the mark mark is gone from the note id.
MarkChanged
NOTES-5: a watch’s word: a mark made or changed on the note id, whole.
MarkRemoved
NOTES-5: a watch’s word: the mark mark taken off the note id.
Text
NOTES-5: a watch’s word with text: true — the note’s markdown after
a change (at most once a second, the last change always said), and
once as the watch opens: its revision then, who wrote it last and when
(unix seconds).
May
may’s answer: whether the caller holds role on the note id.
Watching
A watch is open: what it hears follows (id when it watches one note).
Lagged
A watch fell behind by missed writes: read again (state, list).
WatchClosed
A watch ended: reason is signed_out, expired, revoked or refused.
NotFound
No such note, or none the caller may read (one answer); with
revision, no such change kept (none, or squashed). org for an
organization the caller is not in.
Fields
Refused
The caller reads the note but may not do this to it (forbidden,
message naming the grant and role it takes), or the meter refused the
write (quota). Nothing was written.
Slot
NOTES-4: slot’s answer: the note’s slot whole.
Filled
NOTES-4: fill’s answer: the slot with its new fill.
Emptied
NOTES-4: empty’s answer: the slot with nothing in it.
Building
NOTES-4: building’s answer: the slot with its build under way.
Props
NOTES-4: props’ answer: the slot with its props merged.
SlotChanged
NOTES-4: a watch’s word: the slot was filled or emptied — slot whole.
BuildingChanged
NOTES-4: a watch’s word: a build began, moved a step, failed or ended (building absent) — slot whole.
PropsChanged
NOTES-4: a watch’s word: the slot’s props, merged by by — slot whole.
Usage
V2-31: usage { everyone } — what one principal’s changes keep:
the notes they made and the bytes they wrote.
UsageDay
V2-70: usage { everyone, daily } — what one principal’s changes
kept on one UTC day (day: days since 1970-01-01).
Error
Any other in-band refusal, naming the problem; nothing was written.
Implementations§
Trait Implementations§
Source§impl Clone for NotesEvent
impl Clone for NotesEvent
Source§impl Debug for NotesEvent
impl Debug for NotesEvent
Source§impl<'de> Deserialize<'de> for NotesEvent
impl<'de> Deserialize<'de> for NotesEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for NotesEvent
Source§impl FromClientError for NotesEvent
impl FromClientError for NotesEvent
Source§fn from_client_error(error: ClientError) -> Self
fn from_client_error(error: ClientError) -> Self
error. It is the last item of its stream.Source§impl JsonSchema for NotesEvent
impl JsonSchema for NotesEvent
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for NotesEvent
impl PartialEq for NotesEvent
Source§impl Serialize for NotesEvent
impl Serialize for NotesEvent
impl StructuralPartialEq for NotesEvent
Auto Trait Implementations§
impl Forget for NotesEvent
impl Freeze for NotesEvent
impl Move for NotesEvent
impl RefUnwindSafe for NotesEvent
impl Send for NotesEvent
impl Sync for NotesEvent
impl Unpin for NotesEvent
impl UnsafeUnpin for NotesEvent
impl UnwindSafe for NotesEvent
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.