Struct uvls::core::pipeline::AsyncPipeline
source · pub struct AsyncPipeline {
drafts: Arc<DashMap<Url, DraftState>>,
tx_link: Sender<LinkMsg>,
tx_err: Sender<DiagnosticUpdate>,
rx_root: Receiver<Arc<RootGraph>>,
tx_dirty_tree: Sender<()>,
revision_counter: Arc<AtomicU64>,
client: Client,
inlay_handler: InlayHandler,
}
Expand description
All the parsing components and their consumers in a central interface
Fields§
§drafts: Arc<DashMap<Url, DraftState>>
§tx_link: Sender<LinkMsg>
§tx_err: Sender<DiagnosticUpdate>
§rx_root: Receiver<Arc<RootGraph>>
§tx_dirty_tree: Sender<()>
§revision_counter: Arc<AtomicU64>
§client: Client
§inlay_handler: InlayHandler
Implementations§
source§impl AsyncPipeline
impl AsyncPipeline
pub fn new(client: Client) -> Self
pub fn touch(&self, uri: &Url)
pub fn inlay_state(&self) -> &InlayHandler
pub fn client(&self) -> Client
pub fn subscribe_dirty_tree(&self) -> Receiver<()>
pub fn open(&self, uri: Url, text: String, state: DocumentState)
pub fn should_load(&self, uri: &Url, time: SystemTime) -> bool
pub fn stat(&self, uri: &Url) -> Option<(Instant, DocumentState)>
pub async fn delete(&self, uri: &Url, state: DocumentState)
pub fn update(&self, params: DidChangeTextDocumentParams)
sourcepub async fn snapshot_draft(
&self,
uri: &Url,
) -> Result<Option<Draft>, Box<dyn Error + Send + Sync>>
pub async fn snapshot_draft( &self, uri: &Url, ) -> Result<Option<Draft>, Box<dyn Error + Send + Sync>>
Wait for latest draft version
sourcepub async fn snapshot_root(
&self,
uri: &Url,
) -> Result<Arc<RootGraph>, Box<dyn Error + Send + Sync>>
pub async fn snapshot_root( &self, uri: &Url, ) -> Result<Arc<RootGraph>, Box<dyn Error + Send + Sync>>
Wait until uri is found in the linked root graph
pub fn root(&self) -> Receiver<Arc<RootGraph>>
sourcepub async fn snapshot_root_sync(
&self,
uri: &Url,
timestamp: Instant,
) -> Result<Arc<RootGraph>, Box<dyn Error + Send + Sync>>
pub async fn snapshot_root_sync( &self, uri: &Url, timestamp: Instant, ) -> Result<Arc<RootGraph>, Box<dyn Error + Send + Sync>>
wait until uri newer than timestamp in the root graph
pub async fn sync_root<F: Fn(&RootGraph) -> bool>( &self, f: F, ) -> Result<Arc<RootGraph>, Box<dyn Error + Send + Sync>>
Trait Implementations§
source§impl Clone for AsyncPipeline
impl Clone for AsyncPipeline
source§fn clone(&self) -> AsyncPipeline
fn clone(&self) -> AsyncPipeline
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for AsyncPipeline
impl !RefUnwindSafe for AsyncPipeline
impl Send for AsyncPipeline
impl Sync for AsyncPipeline
impl Unpin for AsyncPipeline
impl !UnwindSafe for AsyncPipeline
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§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