pub struct MirParamBinding<'a> {
pub index: usize,
pub local_id: MirLocalId,
pub mode: MirOwnershipMode,
pub local: &'a LocalInfo,
}Expand description
Shared parameter query object used by lowering and backends.
Fields§
§index: usizePositional parameter index in the source signature.
local_id: MirLocalIdMIR local receiving the parameter.
mode: MirOwnershipModeSource ownership mode for the parameter.
local: &'a LocalInfoLocal metadata recorded for the parameter.
Implementations§
Source§impl<'a> MirParamBinding<'a>
impl<'a> MirParamBinding<'a>
Sourcepub fn expects_view(self) -> bool
pub fn expects_view(self) -> bool
Return whether the parameter expects read-only view access.
Sourcepub fn expects_mut_borrow(self) -> bool
pub fn expects_mut_borrow(self) -> bool
Return whether the parameter expects mutable borrow access.
Sourcepub fn expects_owned(self) -> bool
pub fn expects_owned(self) -> bool
Return whether the parameter expects owned value access.
Sourcepub fn semantic_ty(self) -> &'a Ty
pub fn semantic_ty(self) -> &'a Ty
Return the semantic item type exposed at the source-language boundary.
Sourcepub fn source_repr(self) -> MirLocalRepr
pub fn source_repr(self) -> MirLocalRepr
Return the source-language representation expected at the function boundary.
Sourcepub fn local_repr(self) -> MirLocalRepr
pub fn local_repr(self) -> MirLocalRepr
Return the lowered storage/runtime representation of the parameter local.
Sourcepub fn requires_materialization(self) -> bool
pub fn requires_materialization(self) -> bool
Return whether the lowered local needs materialization from the source boundary shape.
Sourcepub fn materializes_view_from_owned(self) -> bool
pub fn materializes_view_from_owned(self) -> bool
Return whether this binding is the view-from-owned materialization case.
Trait Implementations§
Source§impl<'a> Clone for MirParamBinding<'a>
impl<'a> Clone for MirParamBinding<'a>
Source§fn clone(&self) -> MirParamBinding<'a>
fn clone(&self) -> MirParamBinding<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more