pub struct SemanticEditTools { /* private fields */ }
Expand description
Semantic editing tools with session support
Implementations§
Source§impl SemanticEditTools
impl SemanticEditTools
pub fn session_store(&self) -> &SessionStore<SemanticEditSessionData>
pub fn session_store_mut( &mut self, ) -> &mut SessionStore<SemanticEditSessionData>
pub fn language_registry(&self) -> &LanguageRegistry
pub fn file_cache(&self) -> &Mutex<LruCache<String, String>>
pub fn commit_fn(&self) -> &Option<Box<dyn Fn(PathBuf, String) + 'static>>
pub fn commit_fn_mut( &mut self, ) -> &mut Option<Box<dyn Fn(PathBuf, String) + 'static>>
pub fn set_commit_fn( &mut self, commit_fn: Option<Box<dyn Fn(PathBuf, String) + 'static>>, ) -> &mut Self
pub fn default_session_id(&self) -> &'static str
pub fn set_default_session_id( &mut self, default_session_id: &'static str, ) -> &mut Self
pub fn with_default_session_id(self, default_session_id: &'static str) -> Self
Source§impl SemanticEditTools
impl SemanticEditTools
Sourcepub fn get_context(&self, session_id: Option<&str>) -> Result<Option<PathBuf>>
pub fn get_context(&self, session_id: Option<&str>) -> Result<Option<PathBuf>>
Get context for a session
Sourcepub fn stage_operation(
&self,
session_id: Option<&str>,
staged_operation: Option<StagedOperation>,
) -> Result<()>
pub fn stage_operation( &self, session_id: Option<&str>, staged_operation: Option<StagedOperation>, ) -> Result<()>
Stage a new operation, replacing any existing staged operation
Sourcepub fn get_staged_operation(
&self,
session_id: Option<&str>,
) -> Result<Option<StagedOperation>>
pub fn get_staged_operation( &self, session_id: Option<&str>, ) -> Result<Option<StagedOperation>>
Get the currently staged operation, if any
Sourcepub fn take_staged_operation(
&self,
session_id: Option<&str>,
) -> Result<Option<StagedOperation>>
pub fn take_staged_operation( &self, session_id: Option<&str>, ) -> Result<Option<StagedOperation>>
Take the staged operation, removing it from storage
Sourcepub fn modify_staged_operation<F>(
&self,
session_id: Option<&str>,
fun: F,
) -> Result<Option<StagedOperation>>where
F: FnOnce(&mut StagedOperation),
pub fn modify_staged_operation<F>(
&self,
session_id: Option<&str>,
fun: F,
) -> Result<Option<StagedOperation>>where
F: FnOnce(&mut StagedOperation),
Modify the staged operation in place
Trait Implementations§
Source§impl Debug for SemanticEditTools
impl Debug for SemanticEditTools
Source§impl Tool<SemanticEditTools> for CommitStaged
impl Tool<SemanticEditTools> for CommitStaged
Source§impl Tool<SemanticEditTools> for RetargetStaged
impl Tool<SemanticEditTools> for RetargetStaged
Source§impl Tool<SemanticEditTools> for SetContext
impl Tool<SemanticEditTools> for SetContext
Source§impl Tool<SemanticEditTools> for StageOperation
impl Tool<SemanticEditTools> for StageOperation
Auto Trait Implementations§
impl Freeze for SemanticEditTools
impl !RefUnwindSafe for SemanticEditTools
impl !Send for SemanticEditTools
impl !Sync for SemanticEditTools
impl Unpin for SemanticEditTools
impl !UnwindSafe for SemanticEditTools
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> 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>
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