Skip to main content

Renameable

Trait Renameable 

Source
pub trait Renameable<'str, 'ctx>: Named {
    // Required method
    fn rename(&mut self, name: Cow<'str, str>) -> Result<()>;

    // Provided method
    fn with_name(self, name: Cow<'str, str>) -> Result<Self>
       where Self: Sized { ... }
}

Required Methods§

Source

fn rename(&mut self, name: Cow<'str, str>) -> Result<()>

Provided Methods§

Source

fn with_name(self, name: Cow<'str, str>) -> Result<Self>
where Self: Sized,

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<'str, 'ctx, H: QCodeMut<'str>> Renameable<'str, 'ctx> for BaseRef<H, BlockId>
where Self: Named,

Source§

impl<'str, 'ctx, H: QCodeMut<'str>> Renameable<'str, 'ctx> for BaseRef<H, BlockParamId>
where Self: Named,

Source§

impl<'str, 'ctx, H: QCodeMut<'str>> Renameable<'str, 'ctx> for BaseRef<H, InstructionId>
where Self: Named,

Source§

impl<'str, 'ctx> Renameable<'str, 'ctx> for FunctionMutRef<'str, 'ctx>

Source§

impl<'str, 'ctx> Renameable<'str, 'ctx> for VarnodeMutRef<'str, 'ctx>