pub struct Scope<'a> {
pub parent: Option<&'a Scope<'a>>,
pub variables: HashMap<Ident, Variable>,
pub return_type: TypeElement,
pub ownership: Ownership,
pub fn_return: TypeElement,
/* private fields */
}Fields§
§parent: Option<&'a Scope<'a>>§variables: HashMap<Ident, Variable>§return_type: TypeElementexpected type of this scopes return value
ownership: Ownershipexpected ownership of this scopes return value
fn_return: TypeElementImplementations§
Source§impl<'a> Scope<'a>
impl<'a> Scope<'a>
pub fn set_lookup(&mut self, lookup: LookupContext<'a>)
pub fn returns(self, ty: TypeElement, ownership: Ownership) -> Scope<'a>
pub fn functions(&self) -> Vec<FunctionId>
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Scope<'a>
impl<'a> RefUnwindSafe for Scope<'a>
impl<'a> Send for Scope<'a>
impl<'a> Sync for Scope<'a>
impl<'a> Unpin for Scope<'a>
impl<'a> UnwindSafe for Scope<'a>
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> 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