pub struct ReadSession;Expand description
Read the authenticated caller’s local session without a submitted credential.
Implementations§
Source§impl ReadSession
impl ReadSession
Sourcepub const ID: u64 = 0x415554480013
pub const ID: u64 = 0x415554480013
Fixed routing identity, not an authentication or signing domain.
Sourcepub const REQUEST_LIMITS: Limits = EMPTY_LIMITS
pub const REQUEST_LIMITS: Limits = EMPTY_LIMITS
Complete request encoding and decoding allowances.
Sourcepub const RESPONSE_LIMITS: Limits = REPLY_LIMITS
pub const RESPONSE_LIMITS: Limits = REPLY_LIMITS
Complete response encoding and decoding allowances.
Sourcepub fn encode_request(value: &()) -> Result<Vec<u8>, Error>
pub fn encode_request(value: &()) -> Result<Vec<u8>, Error>
Encode this request within all four resource allowances.
§Errors
Returns the supplier’s codec error if admission fails.
Sourcepub fn decode_request(bytes: &[u8]) -> Result<(), Error>
pub fn decode_request(bytes: &[u8]) -> Result<(), Error>
Decode only this contract’s request frame, without establishing trust.
§Errors
Rejects malformed, misrouted, over-budget or trailing input.
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 this method’s reply within all four resource allowances.
§Errors
Returns the supplier’s codec error if admission fails.
Sourcepub fn decode_response(
bytes: &[u8],
) -> Result<Result<SessionView, SessionReadRefusal>, Error>
pub fn decode_response( bytes: &[u8], ) -> Result<Result<SessionView, SessionReadRefusal>, Error>
Decode a reply without treating it as proof of authority.
§Errors
Rejects malformed, misrouted, over-budget or trailing input.
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