Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F73640
libcollar.rs
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
599 B
Subscribers
None
libcollar.rs
View Options
use
crate
::
Result
;
use
crate
::
net
;
pub
struct
State
{
leash
:
net
::
Leash
,
pub
store
:
store
::
Store
,
}
pub
fn
new
()
->
Result
<
State
>
{
let
state
=
State
{
leash
:
net
::
Leash
::
new
(),
store
:
store
::
open
()
?
,
};
state
.
store
.
namespaces
().
define
(
"name"
)
?
;
Ok
(
state
)
}
pub
fn
new_test
(
path
:
&
str
)
->
Result
<
State
>
{
let
state
=
State
{
leash
:
net
::
Leash
::
new
(),
store
:
store
::
open_test
(
path
)
?
,
};
state
.
store
.
namespaces
().
define
(
"name"
)
?
;
Ok
(
state
)
}
impl
State
{
pub
fn
leash
(
&
self
)
->
&
net
::
Leash
{
&
self
.
leash
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jun 8, 6:55 AM (13 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
47561
Default Alt Text
libcollar.rs (599 B)
Attached To
rCOLLAR collar
Event Timeline
Log In to Comment