pub struct Keyring {
pub store: PathBuf,
pub primary: String,
pub ss58_version: u16,
/* private fields */
}Expand description
Gear keyring.
Fields§
§store: PathBufPath to the store.
primary: StringThe primary key.
ss58_version: u16The SS58 prefix.
Implementations§
source§impl Keyring
impl Keyring
sourcepub fn load(store: PathBuf) -> Result<Self>
pub fn load(store: PathBuf) -> Result<Self>
Loads the keyring from the store.
NOTE: For the store path, see [STORE].
sourcepub fn set_primary(&mut self, name: String) -> Result<Keystore>
pub fn set_primary(&mut self, name: String) -> Result<Keystore>
Set the primary key.
sourcepub fn set_ss58_version(&mut self, version: u16) -> Result<()>
pub fn set_ss58_version(&mut self, version: u16) -> Result<()>
Set the SS58 version.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Keyring
impl<'de> Deserialize<'de> for Keyring
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
Auto Trait Implementations§
impl RefUnwindSafe for Keyring
impl Send for Keyring
impl Sync for Keyring
impl Unpin for Keyring
impl UnwindSafe for Keyring
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