pub struct Forge { /* private fields */ }Expand description
Implementations§
Source§impl Forge
impl Forge
Sourcepub fn new() -> Result<Self, String>
pub fn new() -> Result<Self, String>
Attempts to create a new Forge.
§Errors
- Returns
"Another generator has already been created"if a Forge instance already exists. - Returns
"Internal error: forge state mutex poisoned"if the internal state cannot be accessed.
Sourcepub fn generate_asteroid(&self) -> Asteroid
pub fn generate_asteroid(&self) -> Asteroid
Sourcepub fn generate_sunray(&self) -> Sunray
pub fn generate_sunray(&self) -> Sunray
Auto Trait Implementations§
impl Freeze for Forge
impl RefUnwindSafe for Forge
impl Send for Forge
impl Sync for Forge
impl Unpin for Forge
impl UnwindSafe for Forge
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