pub enum IoActionKind {
Show 15 variants
Pure(RtObject),
Bind {
action: Box<IoActionKind>,
continuation: RtObject,
},
PrintLn(String),
ReadLn,
ReadFile(String),
WriteFile {
path: String,
contents: String,
},
GetTime,
Exit(i32),
Throw(RtObject),
Catch {
action: Box<IoActionKind>,
handler: RtObject,
},
NewRef(RtObject),
ReadRef(u64),
WriteRef(u64, RtObject),
Spawn(RtObject),
Wait(u64),
}Expand description
IO action kinds.
Variants§
Pure(RtObject)
Pure value: pure a.
Bind
Bind: x >>= f.
PrintLn(String)
Print a string.
ReadLn
Read a line from stdin.
ReadFile(String)
Read a file.
WriteFile
Write a file.
GetTime
Get the current time.
Exit(i32)
Exit with a code.
Throw(RtObject)
Throw an exception.
Catch
Catch an exception.
NewRef(RtObject)
Create a mutable reference.
ReadRef(u64)
Read a mutable reference.
WriteRef(u64, RtObject)
Write a mutable reference.
Spawn(RtObject)
Spawn a new task.
Wait(u64)
Wait for a task to complete.
Trait Implementations§
Source§impl Clone for IoActionKind
impl Clone for IoActionKind
Source§fn clone(&self) -> IoActionKind
fn clone(&self) -> IoActionKind
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for IoActionKind
impl RefUnwindSafe for IoActionKind
impl Send for IoActionKind
impl Sync for IoActionKind
impl Unpin for IoActionKind
impl UnsafeUnpin for IoActionKind
impl UnwindSafe for IoActionKind
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