pub struct ReadSession;Expand description
Proof-free local read contract; the runtime caller selects the session.
Implementations§
Source§impl ReadSession
impl ReadSession
Sourcepub const ID: u64 = 0x415554480013
pub const ID: u64 = 0x415554480013
Stable IC Wire envelope identity; not a cryptographic domain separator.
Sourcepub const NAME: &'static str = "portable_session_read"
pub const NAME: &'static str = "portable_session_read"
Transport name for adapters exposing this contract.
Sourcepub const REQUEST_LIMITS: Limits = EMPTY_LIMITS
pub const REQUEST_LIMITS: Limits = EMPTY_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: &()) -> Result<Vec<u8>, Error>
pub fn encode_request(value: &()) -> Result<Vec<u8>, Error>
Encode a request with this contract’s identity and complete request budget.
Sourcepub fn decode_request(bytes: &[u8]) -> Result<(), Error>
pub fn decode_request(bytes: &[u8]) -> Result<(), Error>
Decode a request, rejecting a different identity or exceeded request budget.
Sourcepub fn encode_response(
value: &Result<SessionView, SessionReadRefusal>,
) -> Result<Vec<u8>, Error>
pub fn encode_response( value: &Result<SessionView, SessionReadRefusal>, ) -> 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, SessionReadRefusal>, Error>
pub fn decode_response( bytes: &[u8], ) -> Result<Result<SessionView, SessionReadRefusal>, Error>
Decode a response, rejecting a different identity or exceeded response budget.
Auto Trait Implementations§
impl Forget for ReadSession
impl Freeze for ReadSession
impl Move for ReadSession
impl RefUnwindSafe for ReadSession
impl Send for ReadSession
impl Sync for ReadSession
impl Unpin for ReadSession
impl UnsafeUnpin for ReadSession
impl UnwindSafe for ReadSession
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