pub struct Comments { /* private fields */ }Expand description
The comments of one served or version folder: its store, the bus every
successful write is announced on — comments <page>, once, as the write
lands — so open pages fetch that page’s threads again, and the folder a
new thread’s page must be a file in.
Implementations§
Source§impl Comments
impl Comments
Sourcepub fn new(
store: Arc<dyn Store>,
changes: Arc<dyn Publish>,
folder: ServedFolder,
) -> Self
pub fn new( store: Arc<dyn Store>, changes: Arc<dyn Publish>, folder: ServedFolder, ) -> Self
The comments kept by store, announced on changes, for the pages of
folder.
Sourcepub fn create(
&self,
page: &str,
anchor: Anchor,
author: &str,
text: &str,
) -> Result<String, Refused>
pub fn create( &self, page: &str, anchor: Anchor, author: &str, text: &str, ) -> Result<String, Refused>
Starts a thread on page, which must be a file in the folder.
Sourcepub fn reply(&self, id: &str, author: &str, text: &str) -> Result<(), Refused>
pub fn reply(&self, id: &str, author: &str, text: &str) -> Result<(), Refused>
Appends a reply to thread id, wherever it is — detached included.
Sourcepub fn carry(&self, version: &Folder) -> Result<Carry>
pub fn carry(&self, version: &Folder) -> Result<Carry>
Where every attached thread goes on version, this folder opened on
the version’s entry document: each finds its quote in its
page’s text as the page shows it — front matter left out, widget
tags expanded — by its context where it can, and is detached when
the quote, or the page, is gone. Nothing is written: the publish
commits the Carry together with its version, so both land or
neither does, and then Comments::carried announces it. It renders
pages, which draws their diagrams: it blocks.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Comments
impl !UnwindSafe for Comments
impl Freeze for Comments
impl Send for Comments
impl Sync for Comments
impl Unpin for Comments
impl UnsafeUnpin for Comments
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> Fruit for T
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> ⓘ
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> ⓘ
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