pub struct NotesActivation { /* private fields */ }Expand description
The activation: the store over notes.db, the seam to the running
service, and the resolver every caller is verified by.
Implementations§
Source§impl NotesActivation
impl NotesActivation
Sourcepub fn new(store: Arc<NotesStore>) -> Self
pub fn new(store: Arc<NotesStore>) -> Self
Over store. Inside a runtime, presence that idled out is swept
every few seconds for as long as the store lives (and said left).
Sourcepub fn store(&self) -> &Arc<NotesStore> ⓘ
pub fn store(&self) -> &Arc<NotesStore> ⓘ
The store it keeps.
Source§impl NotesActivation
Notes: writing on its own, written by many hands at once — make one, read it, write it live (a Yjs CRDT), see who is on it, replay how it was built.
impl NotesActivation
Notes: writing on its own, written by many hands at once — make one, read it, write it live (a Yjs CRDT), see who is on it, replay how it was built.
Sourcepub async fn create(
&self,
user: Caller,
title: NoteTitle,
body: Option<NoteBody>,
org: Option<OrgId>,
) -> impl Stream<Item = NotesEvent> + Send + 'static
pub async fn create( &self, user: Caller, title: NoteTitle, body: Option<NoteBody>, org: Option<OrgId>, ) -> impl Stream<Item = NotesEvent> + Send + 'static
Make a note in an organization you write in; yields created { note } (revision 1, its id 8 characters, opened at #/note/
org names the organization (acme); without it, the first one you
write notes in. Who may read and write the note is the roles
held on its organization (acme:) or on *. Refused in band:
not_found { org } for an organization you are not in, refused { forbidden } for one you only read. Editor.
Sourcepub async fn get(
&self,
user: Caller,
id: NoteId,
) -> impl Stream<Item = NotesEvent> + Send + 'static
pub async fn get( &self, user: Caller, id: NoteId, ) -> impl Stream<Item = NotesEvent> + Send + 'static
A note whole; yields note { note } — its title, its body (the markdown its CRDT holds now), its revision, who made it and who wrote it last — or not_found.
A note in an organization you do not read is not_found, as one
there is not. replay reads it as it stood at a moment. Viewer.
Sourcepub async fn list(
&self,
user: Caller,
query: Option<NoteQuery>,
limit: Option<u32>,
after: Option<NoteId>,
) -> impl Stream<Item = NotesEvent> + Send + 'static
pub async fn list( &self, user: Caller, query: Option<NoteQuery>, limit: Option<u32>, after: Option<NoteId>, ) -> impl Stream<Item = NotesEvent> + Send + 'static
The notes you read, newest made first, without their bodies; yields rows { items: [note { note }] } then page { next, remaining }.
query keeps those whose title holds every word of it, case-blind.
A page is 50 rows unless limit says (at most 1,000); after is the
last row’s id of the page before (page.next). Viewer.
Sourcepub async fn save(
&self,
user: Caller,
id: NoteId,
body: NoteBody,
base: Option<u32>,
) -> impl Stream<Item = NotesEvent> + Send + 'static
pub async fn save( &self, user: Caller, id: NoteId, body: NoteBody, base: Option<u32>, ) -> impl Stream<Item = NotesEvent> + Send + 'static
Write a note’s body whole — merged with whatever else is being written; yields saved { id, revision, at, by } (stale: true when base was not the revision it found).
For an agent or a script over synapse: the body given is diffed
against the text now and made into the CRDT’s own inserts and deletes,
so it merges with live typing instead of overwriting it (a hand typing
in a paragraph the body did not change keeps its words). base is the
revision you read (note.revision). A body equal to the text writes
nothing. The editor sends updates instead. Editor.
Sourcepub async fn update(
&self,
user: Caller,
id: NoteId,
update: NoteUpdate,
session: Option<NoteSession>,
) -> impl Stream<Item = NotesEvent> + Send + 'static
pub async fn update( &self, user: Caller, id: NoteId, update: NoteUpdate, session: Option<NoteSession>, ) -> impl Stream<Item = NotesEvent> + Send + 'static
Apply a Yjs update to a note’s body — the editor’s live typing; yields applied { id, revision }.
update is a Yjs v1 update of the note’s body text (base64),
as the page’s ydoc made it; it is merged into the note’s CRDT,
kept as a change with you and the moment, and said to everyone on the
note (watch’s updated) — not back to session, when you name
the presence it came from. Editor.
Sourcepub async fn state(
&self,
user: Caller,
id: NoteId,
vector: Option<NoteVector>,
) -> impl Stream<Item = NotesEvent> + Send + 'static
pub async fn state( &self, user: Caller, id: NoteId, vector: Option<NoteVector>, ) -> impl Stream<Item = NotesEvent> + Send + 'static
What your copy of a note’s CRDT lacks; yields state { id, update, vector, revision } — the Yjs update to apply, and the note’s own state vector.
vector is your state vector (Y.encodeStateVector, base64); with
none, the whole note. Send back what the note lacks of yours
(Y.encodeStateAsUpdate(ydoc, vector)) as an update. Viewer.
Sourcepub async fn history(
&self,
user: Caller,
id: NoteId,
limit: Option<u32>,
before: Option<u32>,
) -> impl Stream<Item = NotesEvent> + Send + 'static
pub async fn history( &self, user: Caller, id: NoteId, limit: Option<u32>, before: Option<u32>, ) -> impl Stream<Item = NotesEvent> + Send + 'static
Every change of a note, newest first; yields change { change: { seq, kind, at, by, principal, bytes, title?, authors? } } each.
Every change is kept with who and when until squashed: create,
update (live typing), save (a whole body, merged), rename,
delete, and snapshot (a squash: its authors say who wrote what
in it). at is unix milliseconds. before pages back by seq. Viewer.
Sourcepub async fn replay(
&self,
user: Caller,
id: NoteId,
seq: Option<u32>,
at: Option<i64>,
) -> impl Stream<Item = NotesEvent> + Send + 'static
pub async fn replay( &self, user: Caller, id: NoteId, seq: Option<u32>, at: Option<i64>, ) -> impl Stream<Item = NotesEvent> + Send + 'static
A note as it stood at a moment; yields note { note } — its title and body then, revision the change it stood at — or not_found { revision }.
seq stands it after that change (history’s); at (unix
milliseconds) after the last change made by then. A moment before the
first change kept — squashed away — is not_found. With neither, now.
Viewer.
Sourcepub async fn squash(
&self,
user: Caller,
id: NoteId,
until: u32,
) -> impl Stream<Item = NotesEvent> + Send + 'static
pub async fn squash( &self, user: Caller, id: NoteId, until: u32, ) -> impl Stream<Item = NotesEvent> + Send + 'static
Collapse a note’s changes up to a moment into one snapshot, keeping who wrote what; yields squashed { id, until, removed, at, by }, said on watch.
The changes up to until (a seq) become one snapshot change whose
authors say each writer’s changes and bytes; later changes stay as
they are. A replay before until is not_found after. Needs its own
grant, notes.squash, on the note’s organization — admin’s by
default, grantable to a role by the role table; refused typed
without it. Admin.
Sourcepub async fn present(
&self,
user: Caller,
id: NoteId,
) -> impl Stream<Item = NotesEvent> + Send + 'static
pub async fn present( &self, user: Caller, id: NoteId, ) -> impl Stream<Item = NotesEvent> + Send + 'static
Who is on a note now; yields present { present: { session, principal, name, agent, colour, client?, awareness?, at } } each.
A connection is on it while its watch { id, session } is open; a
writer without one (an agent’s save) while it writes, idling out
after 30 s. Viewer.
Sourcepub async fn here(
&self,
user: Caller,
id: NoteId,
session: NoteSession,
client: Option<u64>,
awareness: Option<NoteAwareness>,
) -> impl Stream<Item = NotesEvent> + Send + 'static
pub async fn here( &self, user: Caller, id: NoteId, session: NoteSession, client: Option<u64>, awareness: Option<NoteAwareness>, ) -> impl Stream<Item = NotesEvent> + Send + 'static
Say where your caret is on a note; yields present { present }, said to everyone on it.
awareness is your page’s Yjs awareness update (base64) — your
caret, your selection — and client your Yjs client id; session
your page’s, as your watch named it (one someone else holds is
refused). Viewer.
Sourcepub async fn rename(
&self,
user: Caller,
id: NoteId,
title: NoteTitle,
) -> impl Stream<Item = NotesEvent> + Send + 'static
pub async fn rename( &self, user: Caller, id: NoteId, title: NoteTitle, ) -> impl Stream<Item = NotesEvent> + Send + 'static
Retitle a note; yields renamed { id, title, revision, at, by }. Editor.
Sourcepub async fn delete(
&self,
user: Caller,
id: NoteId,
) -> impl Stream<Item = NotesEvent> + Send + 'static
pub async fn delete( &self, user: Caller, id: NoteId, ) -> impl Stream<Item = NotesEvent> + Send + 'static
Delete a note; yields deleted { id, at, by }. Its changes stay in the service’s file. Admin.
Sourcepub async fn restore(
&self,
user: Caller,
id: NoteId,
seq: u32,
) -> impl Stream<Item = NotesEvent> + Send + 'static
pub async fn restore( &self, user: Caller, id: NoteId, seq: u32, ) -> impl Stream<Item = NotesEvent> + Send + 'static
Put a note’s body back as it stood after a change; yields saved { id, revision, at, by } — the restore is a change more, merged like a save. Editor.
Sourcepub async fn may(
&self,
user: Caller,
id: NoteId,
role: Role,
) -> impl Stream<Item = NotesEvent> + Send + 'static
pub async fn may( &self, user: Caller, id: NoteId, role: Role, ) -> impl Stream<Item = NotesEvent> + Send + 'static
Whether you hold a role on a note — viewer | editor | admin — as the gate says on its organization now; yields may { id, role, held }, or not_found for one you do not read.
The question another service asks through the seam before it keeps
something of a note’s, as the caller (the service that keeps
images asks editor before it keeps one for a note, viewer
before it answers one). Nothing is written. Viewer.
Sourcepub async fn ask(
&self,
user: Caller,
id: NoteId,
from: u32,
to: u32,
text: ThreadText,
to_whom: Option<AgentName>,
) -> impl Stream<Item = NotesEvent> + Send + 'static
pub async fn ask( &self, user: Caller, id: NoteId, from: u32, to: u32, text: ThreadText, to_whom: Option<AgentName>, ) -> impl Stream<Item = NotesEvent> + Send + 'static
Ask a question on a range of a note — it stays beside that text as the text changes; yields asked { thread }, said on watch.
from and to are the range in characters of the text now (as
get’s body counts them). The range is anchored in the note’s
CRDT, so it follows the text through every edit (thread.from,
thread.to where it stands now; deleted whole, the thread is
detached). text is the question (markdown: links, images).
to_whom asks it of an agent (builder, or agent for any); such
a question is listed by waiting and said to every watch of the
organization’s notes, so an agent picks it up, and may answer
with reply or edit the note itself. Editor.
Sourcepub async fn reply(
&self,
user: Caller,
id: NoteId,
thread: ThreadId,
body: ThreadText,
) -> impl Stream<Item = NotesEvent> + Send + 'static
pub async fn reply( &self, user: Caller, id: NoteId, thread: ThreadId, body: ThreadText, ) -> impl Stream<Item = NotesEvent> + Send + 'static
Answer in a thread — words, links, images; yields replied { thread }, said on watch. Editor.
Sourcepub async fn resolve(
&self,
user: Caller,
id: NoteId,
thread: ThreadId,
open: Option<bool>,
) -> impl Stream<Item = NotesEvent> + Send + 'static
pub async fn resolve( &self, user: Caller, id: NoteId, thread: ThreadId, open: Option<bool>, ) -> impl Stream<Item = NotesEvent> + Send + 'static
Resolve a thread (it folds in the margin), or open it again; yields resolved { thread }, said on watch. Editor.
Sourcepub async fn threads(
&self,
user: Caller,
id: NoteId,
) -> impl Stream<Item = NotesEvent> + Send + 'static
pub async fn threads( &self, user: Caller, id: NoteId, ) -> impl Stream<Item = NotesEvent> + Send + 'static
A note’s threads, in the order their ranges stand in the text, the detached ones last; yields thread { thread } each.
Each thread is whole: its anchor (two Yjs relative positions, for a page to resolve in its own copy), its range now in characters, the text it quoted, the question, whom it was asked of, its answers, and whether it is resolved. Viewer.
Sourcepub async fn waiting(
&self,
user: Caller,
to: Option<AgentName>,
) -> impl Stream<Item = NotesEvent> + Send + 'static
pub async fn waiting( &self, user: Caller, to: Option<AgentName>, ) -> impl Stream<Item = NotesEvent> + Send + 'static
The open questions asked of someone, in the notes you read, oldest first; yields thread { thread } each — an agent’s queue.
to keeps those asked of that name (builder, or agent for the
ones asked of any agent). Viewer.
Sourcepub async fn slot(
&self,
user: Caller,
id: NoteId,
) -> impl Stream<Item = NotesEvent> + Send + 'static
pub async fn slot( &self, user: Caller, id: NoteId, ) -> impl Stream<Item = NotesEvent> + Send + 'static
NOTES-4: a note’s slot whole; yields slot { slot: { id, fill?, props, fills, building? } } — what fills it now, its props, every fill newest first, the build under way.
A fill is { n, component, version, say?, by, principal, at }; a
build { component, step?, say?, failed, by, principal, started, at }.
The page draws fill by a mark pinned to its version. Viewer.
Sourcepub async fn fill(
&self,
user: Caller,
id: NoteId,
component: ComponentName,
version: VersionRef,
props: Option<SlotProps>,
say: Option<SlotSay>,
) -> impl Stream<Item = NotesEvent> + Send + 'static
pub async fn fill( &self, user: Caller, id: NoteId, component: ComponentName, version: VersionRef, props: Option<SlotProps>, say: Option<SlotSay>, ) -> impl Stream<Item = NotesEvent> + Send + 'static
NOTES-4: fill a note’s slot with a component of a kept version; yields filled { slot }, said on watch as slot_changed; the build under way ends.
The ui service is asked whether version (a hash, or its first 6 hex
digits or more) holds component: refused unknown_version or
unknown_component naming both, the slot unchanged. props replaces
the slot’s props (none: they stay); say is one line of what this
fill does. Every open page draws it in place. Editor.
Sourcepub async fn empty(
&self,
user: Caller,
id: NoteId,
) -> impl Stream<Item = NotesEvent> + Send + 'static
pub async fn empty( &self, user: Caller, id: NoteId, ) -> impl Stream<Item = NotesEvent> + Send + 'static
NOTES-4: empty a note’s slot — nothing drawn, its props cleared, its fills kept; yields emptied { slot }, said on watch as slot_changed. Editor.
Sourcepub async fn building(
&self,
user: Caller,
id: NoteId,
component: ComponentName,
step: Option<BuildStep>,
say: Option<SlotSay>,
failed: Option<bool>,
) -> impl Stream<Item = NotesEvent> + Send + 'static
pub async fn building( &self, user: Caller, id: NoteId, component: ComponentName, step: Option<BuildStep>, say: Option<SlotSay>, failed: Option<bool>, ) -> impl Stream<Item = NotesEvent> + Send + 'static
NOTES-4: say a slot is being built — a step, a line, a failure; yields building { slot }, said on watch as building_changed.
step is the last reached: heard, written or compiled; say
one line; failed: true with say holding the refusal (the
compiler’s line) marks a build that failed. The component that is in
the slot stays drawn. A fill or an empty ends it; so do ten minutes
without a word, and a restart: it is kept in memory only. Editor.
Sourcepub async fn props(
&self,
user: Caller,
id: NoteId,
patch: SlotProps,
) -> impl Stream<Item = NotesEvent> + Send + 'static
pub async fn props( &self, user: Caller, id: NoteId, patch: SlotProps, ) -> impl Stream<Item = NotesEvent> + Send + 'static
NOTES-4: merge a patch into a slot’s props — what its component keeps its state in; yields props { slot }, said on watch as props_changed { id, props, by, slot }.
A key set to null is taken away. The props are held to 64 KiB
written as JSON: past it, refused { too_large } and nothing
written. Every page open on the note hands the new props to the
component it has mounted. Editor.
Sourcepub async fn mark(
&self,
user: Caller,
id: NoteId,
from: Option<u32>,
to: Option<u32>,
mark: Option<MarkId>,
link: Option<MarkLink>,
label: Option<MarkLabel>,
component: Option<ComponentName>,
version: Option<VersionRef>,
props: Option<SlotProps>,
) -> impl Stream<Item = NotesEvent> + Send + 'static
pub async fn mark( &self, user: Caller, id: NoteId, from: Option<u32>, to: Option<u32>, mark: Option<MarkId>, link: Option<MarkLink>, label: Option<MarkLabel>, component: Option<ComponentName>, version: Option<VersionRef>, props: Option<SlotProps>, ) -> impl Stream<Item = NotesEvent> + Send + 'static
Mark a range of a note — an underline that follows its words, with a link, a line of state, a component under its passage, or any of them; or change a mark; yields marked { mark }, said on watch. The note’s text is not changed.
A new mark names from and to, the range in characters of the
text now (as get’s body counts them); it is anchored in the note’s
CRDT as a question’s range is, so it follows its words through every
edit (mark.from, mark.to where they stand now; every character
deleted, it is detached, kept and drawn nowhere). With mark
instead, that mark is changed: its link and label set as given,
an empty one taken off. link is a ticket (KILN-12), an address of
the app (#/…) or an https address; a click on the underline opens
it. label is one line of state, drawn under the passage with who
left it. component and version place a component of a version the
ui service keeps under the passage that holds the range — never in
the text — with props its props (a JSON object, at most 64 KiB):
the ui service is asked whether the version holds it, refused
unknown_version or unknown_component naming both, nothing written;
mark_props patches the props after. Nothing here writes the note:
its body and its revision stay as they are. Editor.
Sourcepub async fn mark_props(
&self,
user: Caller,
id: NoteId,
mark: MarkId,
patch: SlotProps,
) -> impl Stream<Item = NotesEvent> + Send + 'static
pub async fn mark_props( &self, user: Caller, id: NoteId, mark: MarkId, patch: SlotProps, ) -> impl Stream<Item = NotesEvent> + Send + 'static
Merge a patch into the props of the component a mark places — what the component keeps its state in; yields marked { mark }, said on watch as mark_changed. The note’s text is not changed.
A key set to null is taken away. The props are held to 64 KiB
written as JSON: past it, refused { too_large } and nothing
written; a mark that places no component is refused { no_component }.
Every page open on the note hands the new props to the component it
has mounted under the passage, in place. Editor.
Sourcepub async fn unmark(
&self,
user: Caller,
id: NoteId,
mark: MarkId,
) -> impl Stream<Item = NotesEvent> + Send + 'static
pub async fn unmark( &self, user: Caller, id: NoteId, mark: MarkId, ) -> impl Stream<Item = NotesEvent> + Send + 'static
Take a mark off a note; yields unmarked { id, mark }, said on watch as mark_removed. The note’s text is not changed. Editor.
Sourcepub async fn marks(
&self,
user: Caller,
id: NoteId,
) -> impl Stream<Item = NotesEvent> + Send + 'static
pub async fn marks( &self, user: Caller, id: NoteId, ) -> impl Stream<Item = NotesEvent> + Send + 'static
A note’s marks, in the order their ranges stand in the text, the detached ones last; yields mark { mark } each — where each stands now and the words it holds.
Each mark is whole: its anchor (two Yjs relative positions, for a page
to resolve in its own copy), its range now in characters (from,
to), the words it holds now and the quote it held when made,
its link and label, who left it and when. Viewer.
Sourcepub async fn watch(
&self,
user: Caller,
id: Option<NoteId>,
session: Option<NoteSession>,
text: Option<bool>,
) -> impl Stream<Item = NotesEvent> + Send + 'static
pub async fn watch( &self, user: Caller, id: Option<NoteId>, session: Option<NoteSession>, text: Option<bool>, ) -> impl Stream<Item = NotesEvent> + Send + 'static
Follow notes: watching { id? } first, then created, updated { id, seq, update, by }, renamed, deleted, squashed, asked, replied, resolved, slot_changed, building_changed, props_changed, mark_changed, mark_removed — and, on one note, present and left, and with text the body as words — as they happen; open-ended, ends with watch_closed { reason, message }.
With id, one note’s: each updated carries the Yjs update to
apply (the stream ends after its deleted), and who comes and goes
(present { present }, left { session, client? }); with session
as well, this watch is your presence on it while it is open, and your
own updates (sent with that session) are not said back. Without id,
every note’s you read, note without its body. Held to you by the
gate: asked again when the grants move, a sign-out or the expiry comes,
and closed with a typed reason (signed_out, expired, revoked,
refused); each write is asked of the gate on its organization as it
stands then. lagged { missed } when it fell behind: read again
(state with your vector). NOTES-5: mark_changed { id, mark } (a
mark made or changed, whole) and mark_removed { id, mark }; with
text: true (and id) the note’s markdown as words — text { id, revision, body, by, at } once as the watch opens, then a second
after the first change not yet said, holding every change since:
at most one a second, the last change always said. Viewer.
Sourcepub async fn usage(
&self,
_user: Caller,
everyone: Option<bool>,
daily: Option<bool>,
) -> impl Stream<Item = NotesEvent> + Send + 'static
pub async fn usage( &self, _user: Caller, everyone: Option<bool>, daily: Option<bool>, ) -> impl Stream<Item = NotesEvent> + Send + 'static
Every principal’s notes made and bytes written (admin of *): yields usage { principal, count, bytes } each — what quota.recount reads.
V2-31: from the changes kept — count the notes a principal
made, bytes every change they wrote (a squash’s snapshot is
nobody’s). Admin of *: KEEL-48, everywhere — the gate refuses a
holder on a narrower scope before it runs.
Trait Implementations§
Source§impl Activation for NotesActivation
impl Activation for NotesActivation
type Methods = NotesActivationMethod
fn namespace(&self) -> &str
fn version(&self) -> &str
Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§fn long_description(&self) -> Option<&str>
fn long_description(&self) -> Option<&str>
fn methods(&self) -> Vec<&str>
fn method_help(&self, method: &str) -> Option<String>
fn call<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
method: &'life1 str,
params: Value,
auth: Option<&'life2 AuthContext>,
raw_ctx: Option<&'life3 RawRequestContext>,
) -> Pin<Box<dyn Future<Output = Result<PlexusStream, PlexusError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn into_rpc_methods(self) -> Methods
Source§fn plugin_schema(&self) -> PluginSchema
fn plugin_schema(&self) -> PluginSchema
Source§fn slot_schema() -> Option<PluginSchema>where
Self: Sized,
fn slot_schema() -> Option<PluginSchema>where
Self: Sized,
#[child] publishes as its slot’s type
(MethodRole::DynamicChild { child }). None (the default) for an
activation the macro did not write; #[plexus_macros::activation]
emits it (its static namespace, version, description, methods and
roles).Source§fn plugin_id(&self) -> Uuid
fn plugin_id(&self) -> Uuid
fn resolve_handle<'life0, 'life1, 'async_trait>(
&'life0 self,
_handle: &'life1 Handle,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = PlexusStreamItem> + Send>>, PlexusError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Source§fn static_child_schemas(&self) -> Vec<(String, PluginSchema)>
fn static_child_schemas(&self) -> Vec<(String, PluginSchema)>
(path, schema) — the same list as
ChildRouter::router_static_child_schemas, reachable from the
hub’s type-erased registry (which holds Activations). Read moreSource§impl ChildRouter for NotesActivation
impl ChildRouter for NotesActivation
Source§fn router_namespace(&self) -> &str
fn router_namespace(&self) -> &str
Source§fn router_call<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
method: &'life1 str,
params: Value,
auth: Option<&'life2 AuthContext>,
raw_ctx: Option<&'life3 RawRequestContext>,
) -> Pin<Box<dyn Future<Output = Result<PlexusStream, PlexusError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn router_call<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
method: &'life1 str,
params: Value,
auth: Option<&'life2 AuthContext>,
raw_ctx: Option<&'life3 RawRequestContext>,
) -> Pin<Box<dyn Future<Output = Result<PlexusStream, PlexusError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Source§fn get_child<'life0, 'life1, 'async_trait>(
&'life0 self,
_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<Box<dyn ChildRouter>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_child<'life0, 'life1, 'async_trait>(
&'life0 self,
_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<Box<dyn ChildRouter>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn capabilities(&self) -> ChildCapabilities
fn capabilities(&self) -> ChildCapabilities
Source§fn router_schema(&self) -> Option<PluginSchema>
fn router_schema(&self) -> Option<PluginSchema>
Source§fn peer_child<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Box<dyn ChildRouter>>, PeerError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn peer_child<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Box<dyn ChildRouter>>, PeerError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
name, or why a peer could not be
returned — what routing asks, so a caller gets a typed error item
(not_grafted, unavailable, shape_mismatch, …), never “not
found”, for a peer that failed. Default: Self::get_child, which
cannot fail. #[plexus_macros::activation] overrides it for an
activation with a #[plexus_macros::peer] slot.Source§fn list_children<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<Pin<Box<dyn Stream<Item = String> + Send + 'life0>>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn list_children<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<Pin<Box<dyn Stream<Item = String> + Send + 'life0>>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Source§fn search_children<'life0, 'life1, 'async_trait>(
&'life0 self,
_query: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<Pin<Box<dyn Stream<Item = String> + Send + 'life0>>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn search_children<'life0, 'life1, 'async_trait>(
&'life0 self,
_query: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<Pin<Box<dyn Stream<Item = String> + Send + 'life0>>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Source§fn forward_policy_for(&self, _callee_ns: &str) -> Option<Arc<dyn ForwardPolicy>>
fn forward_policy_for(&self, _callee_ns: &str) -> Option<Arc<dyn ForwardPolicy>>
Source§fn router_static_child_schemas(&self) -> Vec<(String, PluginSchema)>
fn router_static_child_schemas(&self) -> Vec<(String, PluginSchema)>
(path, schema) — path relative to this router, dotted for a
grandchild ("commits", "commits.audit"), schema the child’s own
(its methods’ grants and its roles relative to it, as its macro
wrote them). Read moreSource§fn framework_stamped_principal(&self) -> Principal
fn framework_stamped_principal(&self) -> Principal
plexus_auth_core::Principal of
this router. Read moreSource§impl Clone for NotesActivation
impl Clone for NotesActivation
impl HasClient for NotesActivation
Source§impl NotesActivationSchema for NotesActivationwhere
for<'__plexus_schema> NotesActivation: Clone,
impl NotesActivationSchema for NotesActivationwhere
for<'__plexus_schema> NotesActivation: Clone,
Source§fn create(
&self,
title: NoteTitle,
body: Option<NoteBody>,
org: Option<OrgId>,
) -> BoxStream<'static, NotesEvent>
fn create( &self, title: NoteTitle, body: Option<NoteBody>, org: Option<OrgId>, ) -> BoxStream<'static, NotesEvent>
Source§fn get(&self, id: NoteId) -> BoxStream<'static, NotesEvent>
fn get(&self, id: NoteId) -> BoxStream<'static, NotesEvent>
Source§fn list(
&self,
query: Option<NoteQuery>,
limit: Option<u32>,
after: Option<NoteId>,
) -> BoxStream<'static, NotesEvent>
fn list( &self, query: Option<NoteQuery>, limit: Option<u32>, after: Option<NoteId>, ) -> BoxStream<'static, NotesEvent>
Source§fn save(
&self,
id: NoteId,
body: NoteBody,
base: Option<u32>,
) -> BoxStream<'static, NotesEvent>
fn save( &self, id: NoteId, body: NoteBody, base: Option<u32>, ) -> BoxStream<'static, NotesEvent>
Source§fn update(
&self,
id: NoteId,
update: NoteUpdate,
session: Option<NoteSession>,
) -> BoxStream<'static, NotesEvent>
fn update( &self, id: NoteId, update: NoteUpdate, session: Option<NoteSession>, ) -> BoxStream<'static, NotesEvent>
Source§fn state(
&self,
id: NoteId,
vector: Option<NoteVector>,
) -> BoxStream<'static, NotesEvent>
fn state( &self, id: NoteId, vector: Option<NoteVector>, ) -> BoxStream<'static, NotesEvent>
Source§fn history(
&self,
id: NoteId,
limit: Option<u32>,
before: Option<u32>,
) -> BoxStream<'static, NotesEvent>
fn history( &self, id: NoteId, limit: Option<u32>, before: Option<u32>, ) -> BoxStream<'static, NotesEvent>
Source§fn replay(
&self,
id: NoteId,
seq: Option<u32>,
at: Option<i64>,
) -> BoxStream<'static, NotesEvent>
fn replay( &self, id: NoteId, seq: Option<u32>, at: Option<i64>, ) -> BoxStream<'static, NotesEvent>
Source§fn squash(&self, id: NoteId, until: u32) -> BoxStream<'static, NotesEvent>
fn squash(&self, id: NoteId, until: u32) -> BoxStream<'static, NotesEvent>
Source§fn present(&self, id: NoteId) -> BoxStream<'static, NotesEvent>
fn present(&self, id: NoteId) -> BoxStream<'static, NotesEvent>
Source§fn here(
&self,
id: NoteId,
session: NoteSession,
client: Option<u64>,
awareness: Option<NoteAwareness>,
) -> BoxStream<'static, NotesEvent>
fn here( &self, id: NoteId, session: NoteSession, client: Option<u64>, awareness: Option<NoteAwareness>, ) -> BoxStream<'static, NotesEvent>
Source§fn rename(&self, id: NoteId, title: NoteTitle) -> BoxStream<'static, NotesEvent>
fn rename(&self, id: NoteId, title: NoteTitle) -> BoxStream<'static, NotesEvent>
Source§fn delete(&self, id: NoteId) -> BoxStream<'static, NotesEvent>
fn delete(&self, id: NoteId) -> BoxStream<'static, NotesEvent>
Source§fn restore(&self, id: NoteId, seq: u32) -> BoxStream<'static, NotesEvent>
fn restore(&self, id: NoteId, seq: u32) -> BoxStream<'static, NotesEvent>
Source§fn may(&self, id: NoteId, role: Role) -> BoxStream<'static, NotesEvent>
fn may(&self, id: NoteId, role: Role) -> BoxStream<'static, NotesEvent>
Source§fn ask(
&self,
id: NoteId,
from: u32,
to: u32,
text: ThreadText,
to_whom: Option<AgentName>,
) -> BoxStream<'static, NotesEvent>
fn ask( &self, id: NoteId, from: u32, to: u32, text: ThreadText, to_whom: Option<AgentName>, ) -> BoxStream<'static, NotesEvent>
Source§fn reply(
&self,
id: NoteId,
thread: ThreadId,
body: ThreadText,
) -> BoxStream<'static, NotesEvent>
fn reply( &self, id: NoteId, thread: ThreadId, body: ThreadText, ) -> BoxStream<'static, NotesEvent>
Source§fn resolve(
&self,
id: NoteId,
thread: ThreadId,
open: Option<bool>,
) -> BoxStream<'static, NotesEvent>
fn resolve( &self, id: NoteId, thread: ThreadId, open: Option<bool>, ) -> BoxStream<'static, NotesEvent>
Source§fn threads(&self, id: NoteId) -> BoxStream<'static, NotesEvent>
fn threads(&self, id: NoteId) -> BoxStream<'static, NotesEvent>
Source§fn waiting(&self, to: Option<AgentName>) -> BoxStream<'static, NotesEvent>
fn waiting(&self, to: Option<AgentName>) -> BoxStream<'static, NotesEvent>
Source§fn slot(&self, id: NoteId) -> BoxStream<'static, NotesEvent>
fn slot(&self, id: NoteId) -> BoxStream<'static, NotesEvent>
Source§fn fill(
&self,
id: NoteId,
component: ComponentName,
version: VersionRef,
props: Option<SlotProps>,
say: Option<SlotSay>,
) -> BoxStream<'static, NotesEvent>
fn fill( &self, id: NoteId, component: ComponentName, version: VersionRef, props: Option<SlotProps>, say: Option<SlotSay>, ) -> BoxStream<'static, NotesEvent>
Source§fn empty(&self, id: NoteId) -> BoxStream<'static, NotesEvent>
fn empty(&self, id: NoteId) -> BoxStream<'static, NotesEvent>
Source§fn building(
&self,
id: NoteId,
component: ComponentName,
step: Option<BuildStep>,
say: Option<SlotSay>,
failed: Option<bool>,
) -> BoxStream<'static, NotesEvent>
fn building( &self, id: NoteId, component: ComponentName, step: Option<BuildStep>, say: Option<SlotSay>, failed: Option<bool>, ) -> BoxStream<'static, NotesEvent>
Source§fn props(&self, id: NoteId, patch: SlotProps) -> BoxStream<'static, NotesEvent>
fn props(&self, id: NoteId, patch: SlotProps) -> BoxStream<'static, NotesEvent>
Source§fn mark(
&self,
id: NoteId,
from: Option<u32>,
to: Option<u32>,
mark: Option<MarkId>,
link: Option<MarkLink>,
label: Option<MarkLabel>,
component: Option<ComponentName>,
version: Option<VersionRef>,
props: Option<SlotProps>,
) -> BoxStream<'static, NotesEvent>
fn mark( &self, id: NoteId, from: Option<u32>, to: Option<u32>, mark: Option<MarkId>, link: Option<MarkLink>, label: Option<MarkLabel>, component: Option<ComponentName>, version: Option<VersionRef>, props: Option<SlotProps>, ) -> BoxStream<'static, NotesEvent>
Source§fn mark_props(
&self,
id: NoteId,
mark: MarkId,
patch: SlotProps,
) -> BoxStream<'static, NotesEvent>
fn mark_props( &self, id: NoteId, mark: MarkId, patch: SlotProps, ) -> BoxStream<'static, NotesEvent>
Source§fn unmark(&self, id: NoteId, mark: MarkId) -> BoxStream<'static, NotesEvent>
fn unmark(&self, id: NoteId, mark: MarkId) -> BoxStream<'static, NotesEvent>
Source§fn marks(&self, id: NoteId) -> BoxStream<'static, NotesEvent>
fn marks(&self, id: NoteId) -> BoxStream<'static, NotesEvent>
Source§fn watch(
&self,
id: Option<NoteId>,
session: Option<NoteSession>,
text: Option<bool>,
) -> BoxStream<'static, NotesEvent>
fn watch( &self, id: Option<NoteId>, session: Option<NoteSession>, text: Option<bool>, ) -> BoxStream<'static, NotesEvent>
Auto Trait Implementations§
impl !RefUnwindSafe for NotesActivation
impl !UnwindSafe for NotesActivation
impl Forget for NotesActivation
impl Freeze for NotesActivation
impl Move for NotesActivation
impl Send for NotesActivation
impl Sync for NotesActivation
impl Unpin for NotesActivation
impl UnsafeUnpin for NotesActivation
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,
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> ⓘ
impl<T> MaybeSend for Twhere
T: Send,
impl<T> MaybeSendSync for T
Source§impl<T> Peer for Twhere
T: Activation + ChildRouter,
impl<T> Peer for Twhere
T: Activation + ChildRouter,
Source§fn call<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
method: &'life1 str,
params: Value,
auth: Option<&'life2 AuthContext>,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = PlexusStreamItem> + Send>>, PlexusError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
T: 'async_trait,
fn call<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
method: &'life1 str,
params: Value,
auth: Option<&'life2 AuthContext>,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = PlexusStreamItem> + Send>>, PlexusError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
T: 'async_trait,
repos, or a path below it: child.m).