[−][src]Trait glsp_engine::Lib
A type which can be passed to glsp::add_lib
.
It's possible to implement this trait manually, but using the lib!
macro is
strongly encouraged. Among other things, that macro will automatically implement
MakeArg
for the library type.
Required methods
Loading content...Provided methods
fn borrow() -> LibRef<Self>
Returns a shared reference to the instance of this type owned by the active
Runtime
.
Panics if a library of this type has not been registered with the active Runtime
, or if
the library is currently mutably borrowed.
fn borrow_mut() -> LibRefMut<Self>
Returns a mutable reference to the instance of this type owned by the active
Runtime
.
Panics if a library of this type has not been registered with the active Runtime
, or if
the library is currently borrowed.
fn try_borrow() -> GResult<LibRef<Self>>
Returns a shared reference to the instance of this type owned by the active
Runtime
.
Returns an Err
if a library of this type has not been registered with the active Runtime
,
or if the library is currently mutably borrowed.
fn try_borrow_mut() -> GResult<LibRefMut<Self>>
Returns a mutable reference to the instance of this type owned by the active
Runtime
.
Returns an Err
if a library of this type has not been registered with the active Runtime
,
or if the library is currently borrowed.