Skip to main content

is_loan_eligible

Function is_loan_eligible 

Source
pub const fn is_loan_eligible<M: Message>() -> bool
Expand description

Phase 380 W5 — is this type loan-eligible?

A loan hands out a pointer into the transport’s own memory, which is sound only when the layout is fixed: no length prefix to chase, no variable member. That is exactly SizeBound::plain, so the answer falls out of W1 rather than becoming a second notion of “fixed layout” maintained by hand — which is the drift borrow_loaned_message and subscription_supports_in_place would otherwise each grow their own version of.