pub struct Request {
pub id: RequestId,
pub tenant_id: TenantId,
pub payload: RequestPayload,
}Expand description
A client request to the server.
Fields§
§id: RequestIdUnique request identifier.
tenant_id: TenantIdTenant context for the request.
payload: RequestPayloadThe request payload.
Implementations§
Source§impl Request
impl Request
Sourcepub fn new(id: RequestId, tenant_id: TenantId, payload: RequestPayload) -> Self
pub fn new(id: RequestId, tenant_id: TenantId, payload: RequestPayload) -> Self
Creates a new request.
Sourcepub fn to_frame(&self) -> WireResult<Frame>
pub fn to_frame(&self) -> WireResult<Frame>
Encodes the request to a frame.
Sourcepub fn from_frame(frame: &Frame) -> WireResult<Self>
pub fn from_frame(frame: &Frame) -> WireResult<Self>
Decodes a request from a frame.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Request
impl<'de> Deserialize<'de> for Request
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnwindSafe for Request
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