pub struct RpcFrame {
pub protocol: Protocol,
pub meta: MetaMap,
/* private fields */
}Fields§
§protocol: Protocol§meta: MetaMapImplementations§
Source§impl RpcFrame
impl RpcFrame
pub fn new(protocol: Protocol, meta: MetaMap, data: Vec<u8>) -> Self
pub fn new_reset_session() -> Self
pub fn data(&self) -> &[u8] ⓘ
pub fn is_error(&self) -> bool
pub fn from_raw_data(raw_data: Vec<u8>) -> Result<Self, Error>
pub fn from_rpcmessage(msg: &RpcMessage) -> Result<RpcFrame>
pub fn to_rpcmesage(&self) -> Result<RpcMessage>
pub fn prepare_response_meta(src: &MetaMap) -> Result<MetaMap, &'static str>
Trait Implementations§
Source§impl RpcMessageMetaTags for RpcFrame
impl RpcMessageMetaTags for RpcFrame
type Target = RpcFrame
fn tag(&self, id: i32) -> Option<&RpcValue>
fn set_tag(&mut self, id: i32, val: Option<RpcValue>) -> &mut Self::Target
fn is_request(&self) -> bool
fn is_response(&self) -> bool
fn is_signal(&self) -> bool
fn request_id(&self) -> Option<RqId>
fn try_request_id(&self) -> Result<RqId>
fn set_request_id(&mut self, id: RqId) -> &mut Self::Target
fn shv_path(&self) -> Option<&str>
fn set_shvpath(&mut self, shv_path: &str) -> &mut Self::Target
fn method(&self) -> Option<&str>
fn set_method(&mut self, method: &str) -> &mut Self::Target
fn source(&self) -> Option<&str>
fn set_source(&mut self, source: &str) -> &mut Self::Target
fn access_level(&self) -> Option<i32>
fn set_access_level(&mut self, grant: AccessLevel) -> &mut Self::Target
fn user_id(&self) -> Option<&str>
fn set_user_id(&mut self, user_id: &str) -> &mut Self::Target
fn caller_ids(&self) -> Vec<PeerId> ⓘ
fn set_caller_ids(&mut self, ids: &[PeerId]) -> &mut Self::Target
fn push_caller_id(&mut self, id: PeerId) -> &mut Self::Target
fn pop_caller_id(&mut self) -> Option<PeerId>
fn seqno(&self) -> Option<SeqNo>
fn set_seqno(&mut self, n: SeqNo) -> &mut Self::Target
Auto Trait Implementations§
impl Freeze for RpcFrame
impl RefUnwindSafe for RpcFrame
impl Send for RpcFrame
impl Sync for RpcFrame
impl Unpin for RpcFrame
impl UnwindSafe for RpcFrame
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