pub struct SchemeRouter {
schemes: BTreeMap<String, SchemeEntry>,
next_id: u64,
}Expand description
Scheme router state
Fields§
§schemes: BTreeMap<String, SchemeEntry>Registered schemes by name
next_id: u64Next scheme ID
Implementations§
Source§impl SchemeRouter
impl SchemeRouter
Sourcepub fn register(
&mut self,
name: &str,
scheme: DynScheme,
) -> Result<u64, SyscallError>
pub fn register( &mut self, name: &str, scheme: DynScheme, ) -> Result<u64, SyscallError>
Register a new scheme
Sourcepub fn unregister(&mut self, name: &str) -> Result<(), SyscallError>
pub fn unregister(&mut self, name: &str) -> Result<(), SyscallError>
Unregister a scheme
Auto Trait Implementations§
impl !RefUnwindSafe for SchemeRouter
impl !UnwindSafe for SchemeRouter
impl Freeze for SchemeRouter
impl Send for SchemeRouter
impl Sync for SchemeRouter
impl Unpin for SchemeRouter
impl UnsafeUnpin for SchemeRouter
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more