pub struct Contract<Request, Response> {
pub name: &'static str,
pub mode: &'static str,
pub id: u64,
pub request: Limits,
pub response: Limits,
/* private fields */
}Expand description
A handler’s types and explicit frame settings, without a registry or transport.
Prefer the attribute’s contract = NAME output to a separately maintained
declaration. Native schemas do not prove target-specific type-layout parity;
the consumer still owns final artifact admission.
Fields§
§name: &'static strIC method name.
mode: &'static strIC mode: query, composite_query, or update.
id: u64Native frame method identity.
request: LimitsRequest limits, including the 11-byte frame header.
response: LimitsResponse limits, including the 11-byte frame header.
Implementations§
Source§impl<Request, Response> Contract<Request, Response>
impl<Request, Response> Contract<Request, Response>
Sourcepub fn admit_request(&self)
pub fn admit_request(&self)
Check frame size, identity and direction before copying the full ingress. Run as a Platform guard; payload validation still occurs during decoding.
Auto Trait Implementations§
impl<Request, Response> Freeze for Contract<Request, Response>
impl<Request, Response> RefUnwindSafe for Contract<Request, Response>
impl<Request, Response> Send for Contract<Request, Response>
impl<Request, Response> Sync for Contract<Request, Response>
impl<Request, Response> Unpin for Contract<Request, Response>
impl<Request, Response> UnsafeUnpin for Contract<Request, Response>
impl<Request, Response> UnwindSafe for Contract<Request, Response>
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