Enum smoldot_light::network_service::Role
source · pub enum Role {
Authority,
Full,
Light,
}
Expand description
Role a node reports playing on the network.
This role can be seen more or less as a priority level. The role a node reports cannot be trusted but is used as a hint. For example, Grandpa votes can be broadcasted with a higher priority to the nodes that report themselves as authorities.
Variants§
Authority
Authorities author blocks and participate in the consensus.
This role is non-binding, and is used only as a hint to prioritize some nodes over others.
Full
Full nodes store the state of the chain. They are part of the infrastructure of the chain in the sense that light nodes benefit from having a lot of full nodes to connect to.
This role is non-binding, and is used only as a hint to prioritize some nodes over others.
Light
Light nodes are the lowest priority nodes.
Implementations§
Trait Implementations§
source§impl PartialEq for Role
impl PartialEq for Role
impl Copy for Role
impl Eq for Role
impl StructuralEq for Role
impl StructuralPartialEq for Role
Auto Trait Implementations§
impl RefUnwindSafe for Role
impl Send for Role
impl Sync for Role
impl Unpin for Role
impl UnwindSafe for Role
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.