#[repr(C)]pub struct StackSizeRequest { /* private fields */ }Expand description
Request a differently-sized stack.
§Usage
static BASE_REVISION: BaseRevision = BaseRevision::new();
// Request a 128 KiB stack
static STACK_SIZE_REQUEST: StackSizeRequest = StackSizeRequest::new().with_size(128 * 1024);
// ...later, in our code
STACK_SIZE_REQUEST.get_response() // ...Implementations§
Source§impl StackSizeRequest
impl StackSizeRequest
Sourcepub const fn with_revision(revision: u64) -> Self
pub const fn with_revision(revision: u64) -> Self
Create a new request with the given revision.
Sourcepub fn id(&self) -> &[u64; 4]
pub fn id(&self) -> &[u64; 4]
Get the ID of this request. This includes the magic number and the request-specific ID.
Sourcepub fn get_response(&self) -> Option<&StackSizeResponse>
pub fn get_response(&self) -> Option<&StackSizeResponse>
Get the response to this request, if it has been set.
Sourcepub fn get_response_mut(&mut self) -> Option<&mut StackSizeResponse>
pub fn get_response_mut(&mut self) -> Option<&mut StackSizeResponse>
Get a mutable reference to the response to this request, if it has been set.
Note that this method takes a mutable reference, so the request will have to be wrapped in a mutex or similar in order to use it.
Sourcepub fn set_size(&mut self, size: impl Into<u64>)
pub fn set_size(&mut self, size: impl Into<u64>)
Set the requested stack size, in bytes. This function operates in place.
§Parameters
- size: The new value for the field.
Auto Trait Implementations§
impl !Freeze for StackSizeRequest
impl !RefUnwindSafe for StackSizeRequest
impl Send for StackSizeRequest
impl Sync for StackSizeRequest
impl Unpin for StackSizeRequest
impl UnwindSafe for StackSizeRequest
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