pub struct NodeRoles(pub u32);Expand description
catapult の NodeRoles。ビットフラグ。
Tuple Fields§
§0: u32Implementations§
Source§impl NodeRoles
impl NodeRoles
pub const PEER: Self
pub const API: Self
pub const VOTING: Self
Sourcepub fn from_name(name: &str) -> Option<Self>
pub fn from_name(name: &str) -> Option<Self>
catapult の設定ファイルでの名前(Peer、Api など)から、そのビット。知らない名前なら None。
Sourcepub fn to_config_value(self) -> String
pub fn to_config_value(self) -> String
catapult の設定ファイル(peers-p2p.json など)の書き方。IPv4,Peer のように , で区切る。
catapult は知らない名前があると読み込めないので、知らないビットは落とす。
Trait Implementations§
impl Copy for NodeRoles
impl Eq for NodeRoles
impl StructuralPartialEq for NodeRoles
Auto Trait Implementations§
impl Freeze for NodeRoles
impl RefUnwindSafe for NodeRoles
impl Send for NodeRoles
impl Sync for NodeRoles
impl Unpin for NodeRoles
impl UnsafeUnpin for NodeRoles
impl UnwindSafe for NodeRoles
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