Struct espr::ir::Scope [−][src]
pub struct Scope(_);
Expand description
Scope declaration
Partial Order
Scope is partially ordered in terms of the sub-scope relation:
let root = Scope::root();
let schema = root.pushed(ScopeType::Schema, "schema");
assert!(root > schema); // schema scope is sub-scope of root scope
Be sure that this is not total order:
let root = Scope::root();
let schema1 = root.pushed(ScopeType::Schema, "schema1");
let schema2 = root.pushed(ScopeType::Schema, "schema2");
// schema1 and schema2 are both sub-scope of root,
assert!(root > schema1);
assert!(root > schema2);
// but they are independent. Comparison always returns false:
assert!(!(schema1 <= schema2));
assert!(!(schema1 >= schema2));
Implementations
Trait Implementations
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for Scope
impl UnwindSafe for Scope
Blanket Implementations
Mutably borrows from an owned value. Read more