Struct endbasic_core::ast::VarRef
source · [−]pub struct VarRef { /* private fields */ }
Expand description
Represents a reference to a variable (which doesn’t have to exist).
Implementations
sourceimpl VarRef
impl VarRef
sourcepub fn new<T: Into<String>>(name: T, ref_type: VarType) -> Self
pub fn new<T: Into<String>>(name: T, ref_type: VarType) -> Self
Creates a new reference to the variable with name
and the optional vtype
type.
sourcepub fn into_unannotated_string(self) -> Result<String, Error>
pub fn into_unannotated_string(self) -> Result<String, Error>
Transforms this reference into an unannotated name.
This is only valid for references that have no annotations in them.
Trait Implementations
impl Eq for VarRef
impl StructuralEq for VarRef
impl StructuralPartialEq for VarRef
Auto Trait Implementations
impl RefUnwindSafe for VarRef
impl Send for VarRef
impl Sync for VarRef
impl Unpin for VarRef
impl UnwindSafe for VarRef
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more