[][src]Struct c2rust_refactor::command::CommandState

pub struct CommandState { /* fields omitted */ }

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]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<E> SpecializationError for E[src]

impl<T> Erased for T[src]

impl<T> Send for T where
    T: ?Sized
[src]

impl<T> Sync for T where
    T: ?Sized
[src]

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]

impl<T> Erased for T

impl<T> Make for T[src]

impl<T> Slottable for T[src]