pub struct Router(pub Principal);
Expand description
A router.
The main router is an extended version of [Index
] which allows registration of a new
contract to cap. It also contains global index canister registry which allows querying
for the root bucket of a contract.
A router bucket implements the same interface as [Index
], but with 1 additional method.
Use Router
’s Into<Index>
implementation to use a Router
as an [Index
].
Tuple Fields§
§0: Principal
Implementations§
Trait Implementations§
Source§impl CandidType for Router
impl CandidType for Router
Source§impl<'de> Deserialize<'de> for Router
impl<'de> Deserialize<'de> for Router
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for Router
Auto Trait Implementations§
impl Freeze for Router
impl RefUnwindSafe for Router
impl Send for Router
impl Sync for Router
impl Unpin for Router
impl UnwindSafe for Router
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