pub struct FiberAttr { /* private fields */ }
Expand description
Fiber attributes container
Implementations§
source§impl FiberAttr
impl FiberAttr
sourcepub fn new() -> Self
pub fn new() -> Self
Create a new fiber attribute container and initialize it with default parameters. Can be used for many fibers creation, corresponding fibers will not take ownership.
This is safe to drop FiberAttr
value when fibers created with this attribute still exist.
sourcepub fn stack_size(&self) -> usize
pub fn stack_size(&self) -> usize
Get stack size from the fiber attribute.
Returns: stack size
sourcepub fn set_stack_size(&mut self, stack_size: usize) -> Result<()>
pub fn set_stack_size(&mut self, stack_size: usize) -> Result<()>
Set stack size for the fiber attribute.
stack_size
- stack size for new fibers
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for FiberAttr
impl !Send for FiberAttr
impl !Sync for FiberAttr
impl Unpin for FiberAttr
impl UnwindSafe for FiberAttr
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