pub struct Scope { /* private fields */ }Expand description
Defines what is in-bounds for the intent.
Nothing outside the scope may appear in context.
Implementations§
Source§impl Scope
impl Scope
Sourcepub fn with_constraint(self, constraint: ScopeConstraint) -> Self
pub fn with_constraint(self, constraint: ScopeConstraint) -> Self
Adds a scope constraint.
Sourcepub fn constraints(&self) -> &[ScopeConstraint]
pub fn constraints(&self) -> &[ScopeConstraint]
Returns the scope constraints.
Sourcepub fn is_defined(&self) -> bool
pub fn is_defined(&self) -> bool
Checks if the scope is defined (has at least one constraint).
Trait Implementations§
impl Eq for Scope
impl StructuralPartialEq for Scope
Auto Trait Implementations§
impl Freeze for Scope
impl RefUnwindSafe for Scope
impl Send for Scope
impl Sync for Scope
impl Unpin for Scope
impl UnwindSafe for Scope
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