pub struct EstablishSession;Expand description
Controlled admission contract; consumers bind it to their own update export.
Implementations§
Source§impl EstablishSession
impl EstablishSession
Sourcepub const ID: u64 = 0x415554480012
pub const ID: u64 = 0x415554480012
Stable IC Wire envelope identity; not a cryptographic domain separator.
Sourcepub const NAME: &'static str = "establish_portable_session"
pub const NAME: &'static str = "establish_portable_session"
Transport name for adapters exposing this contract.
Sourcepub const REQUEST_LIMITS: Limits = CREDENTIAL_LIMITS
pub const REQUEST_LIMITS: Limits = CREDENTIAL_LIMITS
Complete encoding and decoding budget for the request envelope.
Sourcepub const RESPONSE_LIMITS: Limits = REPLY_LIMITS
pub const RESPONSE_LIMITS: Limits = REPLY_LIMITS
Complete encoding and decoding budget for the response envelope.
Sourcepub fn encode_request(value: &SessionInput) -> Result<Vec<u8>, Error>
pub fn encode_request(value: &SessionInput) -> Result<Vec<u8>, Error>
Encode a request with this contract’s identity and complete request budget.
Sourcepub fn decode_request(bytes: &[u8]) -> Result<SessionInput, Error>
pub fn decode_request(bytes: &[u8]) -> Result<SessionInput, Error>
Decode a request, rejecting a different identity or exceeded request budget.
Sourcepub fn encode_response(
value: &Result<SessionView, AdmissionRefusal>,
) -> Result<Vec<u8>, Error>
pub fn encode_response( value: &Result<SessionView, AdmissionRefusal>, ) -> Result<Vec<u8>, Error>
Encode a response with this contract’s identity and complete response budget.
Sourcepub fn decode_response(
bytes: &[u8],
) -> Result<Result<SessionView, AdmissionRefusal>, Error>
pub fn decode_response( bytes: &[u8], ) -> Result<Result<SessionView, AdmissionRefusal>, Error>
Decode a response, rejecting a different identity or exceeded response budget.
Auto Trait Implementations§
impl Forget for EstablishSession
impl Freeze for EstablishSession
impl Move for EstablishSession
impl RefUnwindSafe for EstablishSession
impl Send for EstablishSession
impl Sync for EstablishSession
impl Unpin for EstablishSession
impl UnsafeUnpin for EstablishSession
impl UnwindSafe for EstablishSession
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