[go: up one dir, main page]

sysctl 0.4.1

Simplified interface to libc::sysctl
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `sysctl` crate."><meta name="keywords" content="rust, rustlang, rust-lang, sysctl"><title>sysctl - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../dark.css"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script src="../storage.js"></script></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><p class='location'>Crate sysctl</p><div class="sidebar-elems"><a id='all-types' href='all.html'><p>See all sysctl's items</p></a><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#constants">Constants</a></li><li><a href="#functions">Functions</a></li></ul></div><p class='location'></p><script>window.sidebarCurrent = {name: 'sysctl', ty: 'mod', relpath: '../'};</script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form js-only"><div class="search-container"><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../src/sysctl/lib.rs.html#1-2151' title='goto source code'>[src]</a></span><span class='in-band'>Crate <a class="mod" href=''>sysctl</a></span></h1><div class='docblock'><p>A simplified interface to the <code>sysctl</code> system call.</p>
<p>Currently built for and only tested on FreeBSD.</p>
<h1 id="example-get-description-and-value" class="section-header"><a href="#example-get-description-and-value">Example: Get description and value</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">extern</span> <span class="kw">crate</span> <span class="ident">sysctl</span>;
<span class="attribute">#[<span class="ident">cfg</span>(<span class="ident">not</span>(<span class="ident">target_os</span> <span class="op">=</span> <span class="string">&quot;macos&quot;</span>))]</span>
<span class="kw">fn</span> <span class="ident">main</span>() {
    <span class="kw">let</span> <span class="ident">ctl</span> <span class="op">=</span> <span class="ident">sysctl</span>::<span class="ident">Ctl</span>::<span class="ident">new</span>(<span class="string">&quot;kern.osrevision&quot;</span>)
        .<span class="ident">expect</span>(<span class="string">&quot;could not get sysctl&quot;</span>);

    <span class="kw">let</span> <span class="ident">d</span> <span class="op">=</span> <span class="ident">ctl</span>.<span class="ident">description</span>()
        .<span class="ident">expect</span>(<span class="string">&quot;could not get description&quot;</span>);

    <span class="macro">println</span><span class="macro">!</span>(<span class="string">&quot;Description: {:?}&quot;</span>, <span class="ident">d</span>);

    <span class="kw">let</span> <span class="ident">val_enum</span> <span class="op">=</span> <span class="ident">ctl</span>.<span class="ident">value</span>()
        .<span class="ident">expect</span>(<span class="string">&quot;could not get value&quot;</span>);

    <span class="kw">if</span> <span class="kw">let</span> <span class="ident">sysctl</span>::<span class="ident">CtlValue</span>::<span class="ident">Int</span>(<span class="ident">val</span>) <span class="op">=</span> <span class="ident">val_enum</span> {
        <span class="macro">println</span><span class="macro">!</span>(<span class="string">&quot;Value: {}&quot;</span>, <span class="ident">val</span>);
    }
}

<span class="attribute">#[<span class="ident">cfg</span>(<span class="ident">target_os</span> <span class="op">=</span> <span class="string">&quot;macos&quot;</span>)]</span>
<span class="kw">fn</span> <span class="ident">main</span>() {
    <span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">ctl</span> <span class="op">=</span> <span class="ident">sysctl</span>::<span class="ident">Ctl</span>::<span class="ident">new</span>(<span class="string">&quot;kern.osrevision&quot;</span>)
        .<span class="ident">expect</span>(<span class="string">&quot;could not get sysctl&quot;</span>);

    <span class="comment">// description is not available on macos</span>

    <span class="kw">let</span> <span class="ident">val_enum</span> <span class="op">=</span> <span class="ident">ctl</span>.<span class="ident">value</span>()
        .<span class="ident">expect</span>(<span class="string">&quot;could not get value&quot;</span>);

    <span class="kw">if</span> <span class="kw">let</span> <span class="ident">sysctl</span>::<span class="ident">CtlValue</span>::<span class="ident">Int</span>(<span class="ident">val</span>) <span class="op">=</span> <span class="ident">val_enum</span> {
        <span class="macro">println</span><span class="macro">!</span>(<span class="string">&quot;Value: {}&quot;</span>, <span class="ident">val</span>);
    }
}</pre>
<h1 id="example-get-value-as-struct" class="section-header"><a href="#example-get-value-as-struct">Example: Get value as struct</a></h1>
<pre class="rust rust-example-rendered">
<span class="kw">extern</span> <span class="kw">crate</span> <span class="ident">sysctl</span>;
<span class="kw">extern</span> <span class="kw">crate</span> <span class="ident">libc</span>;

<span class="kw">use</span> <span class="ident">libc</span>::<span class="ident">c_int</span>;

<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Debug</span>)]</span>
<span class="attribute">#[<span class="ident">repr</span>(<span class="ident">C</span>)]</span>
<span class="kw">struct</span> <span class="ident">ClockInfo</span> {
    <span class="ident">hz</span>: <span class="ident">c_int</span>, <span class="comment">/* clock frequency */</span>
    <span class="ident">tick</span>: <span class="ident">c_int</span>, <span class="comment">/* micro-seconds per hz tick */</span>
    <span class="ident">spare</span>: <span class="ident">c_int</span>,
    <span class="ident">stathz</span>: <span class="ident">c_int</span>, <span class="comment">/* statistics clock frequency */</span>
    <span class="ident">profhz</span>: <span class="ident">c_int</span>, <span class="comment">/* profiling clock frequency */</span>
}

<span class="kw">fn</span> <span class="ident">main</span>() {
    <span class="macro">println</span><span class="macro">!</span>(<span class="string">&quot;{:?}&quot;</span>, <span class="ident">sysctl</span>::<span class="ident">value_as</span>::<span class="op">&lt;</span><span class="ident">ClockInfo</span><span class="op">&gt;</span>(<span class="string">&quot;kern.clockrate&quot;</span>));
}</pre>
</div><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
<table>
                       <tr class=' module-item'>
                           <td><a class="struct" href="struct.Ctl.html"
                                  title='struct sysctl::Ctl'>Ctl</a></td>
                           <td class='docblock-short'>
                                <p>This struct represents a system control.</p>

                           </td>
                       </tr>
                       <tr class=' module-item'>
                           <td><a class="struct" href="struct.CtlFlags.html"
                                  title='struct sysctl::CtlFlags'>CtlFlags</a></td>
                           <td class='docblock-short'>
                                
                           </td>
                       </tr>
                       <tr class=' module-item'>
                           <td><a class="struct" href="struct.CtlInfo.html"
                                  title='struct sysctl::CtlInfo'>CtlInfo</a></td>
                           <td class='docblock-short'>
                                <p>A structure representing control metadata</p>

                           </td>
                       </tr>
                       <tr class=' module-item'>
                           <td><a class="struct" href="struct.CtlIter.html"
                                  title='struct sysctl::CtlIter'>CtlIter</a></td>
                           <td class='docblock-short'>
                                <p>An iterator over Sysctl entries.</p>

                           </td>
                       </tr></table><h2 id='enums' class='section-header'><a href="#enums">Enums</a></h2>
<table>
                       <tr class=' module-item'>
                           <td><a class="enum" href="enum.CtlType.html"
                                  title='enum sysctl::CtlType'>CtlType</a></td>
                           <td class='docblock-short'>
                                <p>An Enum that represents a sysctl's type information.</p>

                           </td>
                       </tr>
                       <tr class=' module-item'>
                           <td><a class="enum" href="enum.CtlValue.html"
                                  title='enum sysctl::CtlValue'>CtlValue</a></td>
                           <td class='docblock-short'>
                                <p>An Enum that holds all values returned by sysctl calls.
Extract inner value with <code>if let</code> or <code>match</code>.</p>

                           </td>
                       </tr>
                       <tr class=' module-item'>
                           <td><a class="enum" href="enum.SysctlError.html"
                                  title='enum sysctl::SysctlError'>SysctlError</a></td>
                           <td class='docblock-short'>
                                
                           </td>
                       </tr></table><h2 id='constants' class='section-header'><a href="#constants">Constants</a></h2>
<table>
                       <tr class=' module-item'>
                           <td><a class="constant" href="constant.CTLFLAG_ANYBODY.html"
                                  title='constant sysctl::CTLFLAG_ANYBODY'>CTLFLAG_ANYBODY</a></td>
                           <td class='docblock-short'>
                                
                           </td>
                       </tr>
                       <tr class=' module-item'>
                           <td><a class="constant" href="constant.CTLFLAG_CAPRD.html"
                                  title='constant sysctl::CTLFLAG_CAPRD'>CTLFLAG_CAPRD</a></td>
                           <td class='docblock-short'>
                                
                           </td>
                       </tr>
                       <tr class=' module-item'>
                           <td><a class="constant" href="constant.CTLFLAG_CAPRW.html"
                                  title='constant sysctl::CTLFLAG_CAPRW'>CTLFLAG_CAPRW</a></td>
                           <td class='docblock-short'>
                                
                           </td>
                       </tr>
                       <tr class=' module-item'>
                           <td><a class="constant" href="constant.CTLFLAG_CAPWR.html"
                                  title='constant sysctl::CTLFLAG_CAPWR'>CTLFLAG_CAPWR</a></td>
                           <td class='docblock-short'>
                                
                           </td>
                       </tr>
                       <tr class=' module-item'>
                           <td><a class="constant" href="constant.CTLFLAG_DORMANT.html"
                                  title='constant sysctl::CTLFLAG_DORMANT'>CTLFLAG_DORMANT</a></td>
                           <td class='docblock-short'>
                                
                           </td>
                       </tr>
                       <tr class=' module-item'>
                           <td><a class="constant" href="constant.CTLFLAG_DYING.html"
                                  title='constant sysctl::CTLFLAG_DYING'>CTLFLAG_DYING</a></td>
                           <td class='docblock-short'>
                                
                           </td>
                       </tr>
                       <tr class=' module-item'>
                           <td><a class="constant" href="constant.CTLFLAG_DYN.html"
                                  title='constant sysctl::CTLFLAG_DYN'>CTLFLAG_DYN</a></td>
                           <td class='docblock-short'>
                                
                           </td>
                       </tr>
                       <tr class=' module-item'>
                           <td><a class="constant" href="constant.CTLFLAG_MPSAFE.html"
                                  title='constant sysctl::CTLFLAG_MPSAFE'>CTLFLAG_MPSAFE</a></td>
                           <td class='docblock-short'>
                                
                           </td>
                       </tr>
                       <tr class=' module-item'>
                           <td><a class="constant" href="constant.CTLFLAG_NOFETCH.html"
                                  title='constant sysctl::CTLFLAG_NOFETCH'>CTLFLAG_NOFETCH</a></td>
                           <td class='docblock-short'>
                                
                           </td>
                       </tr>
                       <tr class=' module-item'>
                           <td><a class="constant" href="constant.CTLFLAG_PRISON.html"
                                  title='constant sysctl::CTLFLAG_PRISON'>CTLFLAG_PRISON</a></td>
                           <td class='docblock-short'>
                                
                           </td>
                       </tr>
                       <tr class=' module-item'>
                           <td><a class="constant" href="constant.CTLFLAG_RD.html"
                                  title='constant sysctl::CTLFLAG_RD'>CTLFLAG_RD</a></td>
                           <td class='docblock-short'>
                                
                           </td>
                       </tr>
                       <tr class=' module-item'>
                           <td><a class="constant" href="constant.CTLFLAG_RDTUN.html"
                                  title='constant sysctl::CTLFLAG_RDTUN'>CTLFLAG_RDTUN</a></td>
                           <td class='docblock-short'>
                                
                           </td>
                       </tr>
                       <tr class=' module-item'>
                           <td><a class="constant" href="constant.CTLFLAG_RW.html"
                                  title='constant sysctl::CTLFLAG_RW'>CTLFLAG_RW</a></td>
                           <td class='docblock-short'>
                                
                           </td>
                       </tr>
                       <tr class=' module-item'>
                           <td><a class="constant" href="constant.CTLFLAG_RWTUN.html"
                                  title='constant sysctl::CTLFLAG_RWTUN'>CTLFLAG_RWTUN</a></td>
                           <td class='docblock-short'>
                                
                           </td>
                       </tr>
                       <tr class=' module-item'>
                           <td><a class="constant" href="constant.CTLFLAG_SECURE.html"
                                  title='constant sysctl::CTLFLAG_SECURE'>CTLFLAG_SECURE</a></td>
                           <td class='docblock-short'>
                                
                           </td>
                       </tr>
                       <tr class=' module-item'>
                           <td><a class="constant" href="constant.CTLFLAG_SECURE1.html"
                                  title='constant sysctl::CTLFLAG_SECURE1'>CTLFLAG_SECURE1</a></td>
                           <td class='docblock-short'>
                                
                           </td>
                       </tr>
                       <tr class=' module-item'>
                           <td><a class="constant" href="constant.CTLFLAG_SECURE2.html"
                                  title='constant sysctl::CTLFLAG_SECURE2'>CTLFLAG_SECURE2</a></td>
                           <td class='docblock-short'>
                                
                           </td>
                       </tr>
                       <tr class=' module-item'>
                           <td><a class="constant" href="constant.CTLFLAG_SECURE3.html"
                                  title='constant sysctl::CTLFLAG_SECURE3'>CTLFLAG_SECURE3</a></td>
                           <td class='docblock-short'>
                                
                           </td>
                       </tr>
                       <tr class=' module-item'>
                           <td><a class="constant" href="constant.CTLFLAG_SKIP.html"
                                  title='constant sysctl::CTLFLAG_SKIP'>CTLFLAG_SKIP</a></td>
                           <td class='docblock-short'>
                                
                           </td>
                       </tr>
                       <tr class=' module-item'>
                           <td><a class="constant" href="constant.CTLFLAG_STATS.html"
                                  title='constant sysctl::CTLFLAG_STATS'>CTLFLAG_STATS</a></td>
                           <td class='docblock-short'>
                                
                           </td>
                       </tr>
                       <tr class=' module-item'>
                           <td><a class="constant" href="constant.CTLFLAG_TUN.html"
                                  title='constant sysctl::CTLFLAG_TUN'>CTLFLAG_TUN</a></td>
                           <td class='docblock-short'>
                                
                           </td>
                       </tr>
                       <tr class=' module-item'>
                           <td><a class="constant" href="constant.CTLFLAG_VNET.html"
                                  title='constant sysctl::CTLFLAG_VNET'>CTLFLAG_VNET</a></td>
                           <td class='docblock-short'>
                                
                           </td>
                       </tr>
                       <tr class=' module-item'>
                           <td><a class="constant" href="constant.CTLFLAG_WR.html"
                                  title='constant sysctl::CTLFLAG_WR'>CTLFLAG_WR</a></td>
                           <td class='docblock-short'>
                                
                           </td>
                       </tr>
                       <tr class=' module-item'>
                           <td><a class="constant" href="constant.CTLMASK_SECURE.html"
                                  title='constant sysctl::CTLMASK_SECURE'>CTLMASK_SECURE</a></td>
                           <td class='docblock-short'>
                                
                           </td>
                       </tr>
                       <tr class=' module-item'>
                           <td><a class="constant" href="constant.CTLSHIFT_SECURE.html"
                                  title='constant sysctl::CTLSHIFT_SECURE'>CTLSHIFT_SECURE</a></td>
                           <td class='docblock-short'>
                                
                           </td>
                       </tr>
                       <tr class=' module-item'>
                           <td><a class="constant" href="constant.CTLTYPE.html"
                                  title='constant sysctl::CTLTYPE'>CTLTYPE</a></td>
                           <td class='docblock-short'>
                                
                           </td>
                       </tr>
                       <tr class=' module-item'>
                           <td><a class="constant" href="constant.CTLTYPE_INT.html"
                                  title='constant sysctl::CTLTYPE_INT'>CTLTYPE_INT</a></td>
                           <td class='docblock-short'>
                                
                           </td>
                       </tr>
                       <tr class=' module-item'>
                           <td><a class="constant" href="constant.CTLTYPE_LONG.html"
                                  title='constant sysctl::CTLTYPE_LONG'>CTLTYPE_LONG</a></td>
                           <td class='docblock-short'>
                                
                           </td>
                       </tr>
                       <tr class=' module-item'>
                           <td><a class="constant" href="constant.CTLTYPE_NODE.html"
                                  title='constant sysctl::CTLTYPE_NODE'>CTLTYPE_NODE</a></td>
                           <td class='docblock-short'>
                                
                           </td>
                       </tr>
                       <tr class=' module-item'>
                           <td><a class="constant" href="constant.CTLTYPE_OPAQUE.html"
                                  title='constant sysctl::CTLTYPE_OPAQUE'>CTLTYPE_OPAQUE</a></td>
                           <td class='docblock-short'>
                                
                           </td>
                       </tr>
                       <tr class=' module-item'>
                           <td><a class="constant" href="constant.CTLTYPE_S8.html"
                                  title='constant sysctl::CTLTYPE_S8'>CTLTYPE_S8</a></td>
                           <td class='docblock-short'>
                                
                           </td>
                       </tr>
                       <tr class=' module-item'>
                           <td><a class="constant" href="constant.CTLTYPE_S16.html"
                                  title='constant sysctl::CTLTYPE_S16'>CTLTYPE_S16</a></td>
                           <td class='docblock-short'>
                                
                           </td>
                       </tr>
                       <tr class=' module-item'>
                           <td><a class="constant" href="constant.CTLTYPE_S32.html"
                                  title='constant sysctl::CTLTYPE_S32'>CTLTYPE_S32</a></td>
                           <td class='docblock-short'>
                                
                           </td>
                       </tr>
                       <tr class=' module-item'>
                           <td><a class="constant" href="constant.CTLTYPE_S64.html"
                                  title='constant sysctl::CTLTYPE_S64'>CTLTYPE_S64</a></td>
                           <td class='docblock-short'>
                                
                           </td>
                       </tr>
                       <tr class=' module-item'>
                           <td><a class="constant" href="constant.CTLTYPE_STRING.html"
                                  title='constant sysctl::CTLTYPE_STRING'>CTLTYPE_STRING</a></td>
                           <td class='docblock-short'>
                                
                           </td>
                       </tr>
                       <tr class=' module-item'>
                           <td><a class="constant" href="constant.CTLTYPE_STRUCT.html"
                                  title='constant sysctl::CTLTYPE_STRUCT'>CTLTYPE_STRUCT</a></td>
                           <td class='docblock-short'>
                                
                           </td>
                       </tr>
                       <tr class=' module-item'>
                           <td><a class="constant" href="constant.CTLTYPE_U8.html"
                                  title='constant sysctl::CTLTYPE_U8'>CTLTYPE_U8</a></td>
                           <td class='docblock-short'>
                                
                           </td>
                       </tr>
                       <tr class=' module-item'>
                           <td><a class="constant" href="constant.CTLTYPE_U16.html"
                                  title='constant sysctl::CTLTYPE_U16'>CTLTYPE_U16</a></td>
                           <td class='docblock-short'>
                                
                           </td>
                       </tr>
                       <tr class=' module-item'>
                           <td><a class="constant" href="constant.CTLTYPE_U32.html"
                                  title='constant sysctl::CTLTYPE_U32'>CTLTYPE_U32</a></td>
                           <td class='docblock-short'>
                                
                           </td>
                       </tr>
                       <tr class=' module-item'>
                           <td><a class="constant" href="constant.CTLTYPE_U64.html"
                                  title='constant sysctl::CTLTYPE_U64'>CTLTYPE_U64</a></td>
                           <td class='docblock-short'>
                                
                           </td>
                       </tr>
                       <tr class=' module-item'>
                           <td><a class="constant" href="constant.CTLTYPE_UINT.html"
                                  title='constant sysctl::CTLTYPE_UINT'>CTLTYPE_UINT</a></td>
                           <td class='docblock-short'>
                                
                           </td>
                       </tr>
                       <tr class=' module-item'>
                           <td><a class="constant" href="constant.CTLTYPE_ULONG.html"
                                  title='constant sysctl::CTLTYPE_ULONG'>CTLTYPE_ULONG</a></td>
                           <td class='docblock-short'>
                                
                           </td>
                       </tr>
                       <tr class=' module-item'>
                           <td><a class="constant" href="constant.CTL_MAXNAME.html"
                                  title='constant sysctl::CTL_MAXNAME'>CTL_MAXNAME</a></td>
                           <td class='docblock-short'>
                                
                           </td>
                       </tr></table><h2 id='functions' class='section-header'><a href="#functions">Functions</a></h2>
<table>
                       <tr class=' module-item'>
                           <td><a class="fn" href="fn.next_oid.html"
                                  title='fn sysctl::next_oid'>next_oid</a></td>
                           <td class='docblock-short'>
                                <p>Get the next OID.</p>

                           </td>
                       </tr>
                       <tr class=' module-item'>
                           <td><a class="fn" href="fn.set_oid_value.html"
                                  title='fn sysctl::set_oid_value'>set_oid_value</a></td>
                           <td class='docblock-short'>
                                
                           </td>
                       </tr>
                       <tr class=' module-item'>
                           <td><a class="fn" href="fn.set_value.html"
                                  title='fn sysctl::set_value'>set_value</a></td>
                           <td class='docblock-short'>
                                <p>Sets the value of a sysctl.
Fetches and returns the new value if successful, or a SysctlError
on failure</p>

                           </td>
                       </tr>
                       <tr class=' module-item'>
                           <td><a class="fn" href="fn.value.html"
                                  title='fn sysctl::value'>value</a></td>
                           <td class='docblock-short'>
                                <p>Takes the name of the OID as argument and returns
a result containing the sysctl value if success,
or a SysctlError on failure</p>

                           </td>
                       </tr>
                       <tr class=' module-item'>
                           <td><a class="fn" href="fn.value_as.html"
                                  title='fn sysctl::value_as'>value_as</a></td>
                           <td class='docblock-short'>
                                <p>A generic function that takes a string as argument and
returns a result containing the sysctl value if success,
or a SysctlError on failure.</p>

                           </td>
                       </tr>
                       <tr class=' module-item'>
                           <td><a class="fn" href="fn.value_oid.html"
                                  title='fn sysctl::value_oid'>value_oid</a></td>
                           <td class='docblock-short'>
                                <p>Takes an OID as argument and returns a result
containing the sysctl value if success, or a SysctlError
on failure</p>

                           </td>
                       </tr>
                       <tr class=' module-item'>
                           <td><a class="fn" href="fn.value_oid_as.html"
                                  title='fn sysctl::value_oid_as'>value_oid_as</a></td>
                           <td class='docblock-short'>
                                <p>A generic function that takes an OID as argument and
returns a result containing the sysctl value if success,
or a SysctlError on failure</p>

                           </td>
                       </tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><aside id="help" class="hidden"><div><h1 class="hidden">Help</h1><div class="shortcuts"><h2>Keyboard Shortcuts</h2><dl><dt><kbd>?</kbd></dt><dd>Show this help dialog</dd><dt><kbd>S</kbd></dt><dd>Focus the search field</dd><dt><kbd>↑</kbd></dt><dd>Move up in search results</dd><dt><kbd>↓</kbd></dt><dd>Move down in search results</dd><dt><kbd>↹</kbd></dt><dd>Switch tab</dd><dt><kbd>&#9166;</kbd></dt><dd>Go to active search result</dd><dt><kbd>+</kbd></dt><dd>Expand all sections</dd><dt><kbd>-</kbd></dt><dd>Collapse all sections</dd></dl></div><div class="infos"><h2>Search Tricks</h2><p>Prefix searches with a type followed by a colon (e.g. <code>fn:</code>) to restrict the search to a given type.</p><p>Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, and <code>const</code>.</p><p>Search functions by type signature (e.g. <code>vec -> usize</code> or <code>* -> vec</code>)</p><p>Search multiple things at once by splitting your query with comma (e.g. <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../";window.currentCrate = "sysctl";</script><script src="../aliases.js"></script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>