pub struct Response<C: AsRef<[u8]>> {
pub data: Option<C>,
pub num_descriptors: u32,
pub descriptors: [DoorFd; 2],
}
Expand description
Server-Side representation of the client’s door results
This type can refer to either memory on the stack (which will be cleaned up automatically when door_return is called) or memory on the heap (which will not). If you return an object that refers to memory on the heap, it is your responsibility to free it later.
Many door servers allocate a per-thread response area so that each thread can re-use this area for every door invocation assigned to it. That way the memory leaked is constant. Typically, applications that take this approach will free these per-thread response areas when the DOOR_UNREF message is sent.
Fields§
§data: Option<C>
§num_descriptors: u32
§descriptors: [DoorFd; 2]
Implementations§
Auto Trait Implementations§
impl<C> RefUnwindSafe for Response<C>where C: RefUnwindSafe,
impl<C> Send for Response<C>where C: Send,
impl<C> Sync for Response<C>where C: Sync,
impl<C> Unpin for Response<C>where C: Unpin,
impl<C> UnwindSafe for Response<C>where C: UnwindSafe,
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