pub struct RouterEntry<T, U = ()> { /* private fields */ }Expand description
Registered resource, see RouterBuilder.
Holds the resource definition, the value and the optional value passed to
the check function of the recognize_*checked methods.
Implementations§
Source§impl<T, U> RouterEntry<T, U>
impl<T, U> RouterEntry<T, U>
Sourcepub fn resource(&self) -> &ResourceDef
pub fn resource(&self) -> &ResourceDef
Resource definition
Sourcepub fn resource_mut(&mut self) -> &mut ResourceDef
pub fn resource_mut(&mut self) -> &mut ResourceDef
Mutable reference to the resource definition
Sourcepub fn value_mut(&mut self) -> &mut T
pub fn value_mut(&mut self) -> &mut T
Mutable reference to the value returned for matched resource
Sourcepub fn check_value(&self) -> Option<&U>
pub fn check_value(&self) -> Option<&U>
Value passed to the check function of the recognize_*checked
methods
Sourcepub fn set_check_value<V>(&mut self, value: V) -> &mut RouterEntry<T, U>
pub fn set_check_value<V>(&mut self, value: V) -> &mut RouterEntry<T, U>
Set value passed to the check function of the recognize_*checked
methods
Sourcepub fn set_id(&mut self, id: u16) -> &mut RouterEntry<T, U>
pub fn set_id(&mut self, id: u16) -> &mut RouterEntry<T, U>
Set resource id, see ResourceDef::set_id()
Sourcepub fn set_name<N>(&mut self, name: N) -> &mut RouterEntry<T, U>
pub fn set_name<N>(&mut self, name: N) -> &mut RouterEntry<T, U>
Set resource name, see ResourceDef::set_name()
Trait Implementations§
Source§impl<T, U> Clone for RouterEntry<T, U>
impl<T, U> Clone for RouterEntry<T, U>
Source§fn clone(&self) -> RouterEntry<T, U>
fn clone(&self) -> RouterEntry<T, U>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<T, U> Freeze for RouterEntry<T, U>
impl<T, U> RefUnwindSafe for RouterEntry<T, U>where
T: RefUnwindSafe,
U: RefUnwindSafe,
impl<T, U> Send for RouterEntry<T, U>
impl<T, U> Sync for RouterEntry<T, U>
impl<T, U> Unpin for RouterEntry<T, U>
impl<T, U> UnsafeUnpin for RouterEntry<T, U>where
T: UnsafeUnpin,
U: UnsafeUnpin,
impl<T, U> UnwindSafe for RouterEntry<T, U>where
T: UnwindSafe,
U: UnwindSafe,
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