We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 62801fc commit bdee72bCopy full SHA for bdee72b
1 file changed
vlib/context/empty.v
@@ -9,6 +9,7 @@ import time
9
// An EmptyContext is never canceled, has no values.
10
pub struct EmptyContext {}
11
12
+// deadline returns none, since an EmptyContext has no deadline.
13
pub fn (ctx &EmptyContext) deadline() ?time.Time {
14
return none
15
}
@@ -20,14 +21,17 @@ pub fn (ctx &EmptyContext) done() chan int {
20
21
return ch
22
23
24
+// err returns none, since an EmptyContext is never canceled.
25
pub fn (ctx &EmptyContext) err() IError {
26
27
28
29
+// value returns none, since an EmptyContext carries no values.
30
pub fn (ctx &EmptyContext) value(key Key) ?Any {
31
32
33
34
+// str returns a string describing the Context.
35
pub fn (ctx &EmptyContext) str() string {
36
return 'unknown empty Context'
37
0 commit comments