pub struct ClientWorkspace<'storage> { /* private fields */ }Expand description
Four independent caller-owned buffers for one complete client request.
The constructor borrows every region mutably, so aliasing request and response storage is rejected by safe Rust:
ⓘ
use cloud_sdk::client::ClientWorkspace;
let mut shared = [0_u8; 128];
let mut body = [0_u8; 128];
let mut headers = [0_u8; 128];
let _ = ClientWorkspace::new(&mut shared, &mut body, &mut shared, &mut headers);Implementations§
Source§impl<'storage> ClientWorkspace<'storage>
impl<'storage> ClientWorkspace<'storage>
Sourcepub fn for_profile(
target: &'storage mut [u8],
request_body: &'storage mut [u8],
response_body: &'storage mut [u8],
response_headers: &'storage mut [u8],
profile: ClientCapacityProfile,
) -> Result<Self, ClientCapacityError>
pub fn for_profile( target: &'storage mut [u8], request_body: &'storage mut [u8], response_body: &'storage mut [u8], response_headers: &'storage mut [u8], profile: ClientCapacityProfile, ) -> Result<Self, ClientCapacityError>
Clears and admits four caller-owned regions under one named profile.
Trait Implementations§
Auto Trait Implementations§
impl<'storage> !UnwindSafe for ClientWorkspace<'storage>
impl<'storage> Freeze for ClientWorkspace<'storage>
impl<'storage> RefUnwindSafe for ClientWorkspace<'storage>
impl<'storage> Send for ClientWorkspace<'storage>
impl<'storage> Sync for ClientWorkspace<'storage>
impl<'storage> Unpin for ClientWorkspace<'storage>
impl<'storage> UnsafeUnpin for ClientWorkspace<'storage>
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