[−][src]Struct c2rust_refactor::command::CommandState
Mutable state that can be modified by a "driver" command. This is normally paired with a
RefactorCtxt
, which contains immutable analysis results from the original input Crate
.
Methods
impl CommandState
[src]
pub fn krate(&self) -> Ref<Crate>
[src]
pub fn krate_mut(&self) -> RefMut<Crate>
[src]
pub fn map_krate<F: FnOnce(&mut Crate)>(&self, func: F)
[src]
pub fn krate_changed(&self) -> bool
[src]
pub fn marks(&self) -> Ref<HashSet<(NodeId, Symbol)>>
[src]
pub fn marks_mut(&self) -> RefMut<HashSet<(NodeId, Symbol)>>
[src]
pub fn marked<S: IntoSymbol>(&self, id: NodeId, label: S) -> bool
[src]
pub fn add_mark<S: IntoSymbol>(&self, id: NodeId, label: S)
[src]
pub fn remove_mark<S: IntoSymbol>(&self, id: NodeId, label: S)
[src]
pub fn marks_changed(&self) -> bool
[src]
pub fn node_id_counter(&self) -> &NodeIdCounter
[src]
pub fn next_node_id(&self) -> NodeId
[src]
Generate a fresh NodeId.
pub fn transfer_marks(&self, old: NodeId) -> NodeId
[src]
Transfer marks on old
to a fresh NodeId, and return that fresh NodeId.
pub fn parse_expr(&self, cx: &RefactorCtxt, src: &str) -> P<Expr>
[src]
Parse an Expr
, keeping the original src
around for use during rewriting.
pub fn parse_items(&self, cx: &RefactorCtxt, src: &str) -> Vec<P<Item>>
[src]
pub fn into_inner(self) -> (Crate, HashSet<(NodeId, Symbol)>)
[src]
Auto Trait Implementations
impl !Send for CommandState
impl !Sync for CommandState
Blanket Implementations
impl<T> Lone for T
[src]
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<E> SpecializationError for E
[src]
default fn not_found<S, T>(
trait_name: &'static str,
method_name: &'static str
) -> E where
T: ?Sized,
[src]
trait_name: &'static str,
method_name: &'static str
) -> E where
T: ?Sized,
impl<T> Erased for T
[src]
impl<T> Send for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Sync for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Same for T
type Output = T
Should always be Self
impl<T> MaybeResult for T
[src]
impl<'a, T> Captures for T where
T: ?Sized,
[src]
T: ?Sized,