keyfork-mnemonic-util: impl as_slice to_vec into_vec
This commit is contained in:
parent
f5627e5bd9
commit
3ee81b6a82
|
@ -373,16 +373,31 @@ where
|
||||||
&self.data
|
&self.data
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// A view to internal representation of the decoded data.
|
||||||
|
pub fn as_slice(&self) -> &[u8] {
|
||||||
|
&self.data
|
||||||
|
}
|
||||||
|
|
||||||
/// A clone of the internal representation of the decoded data.
|
/// A clone of the internal representation of the decoded data.
|
||||||
pub fn to_bytes(&self) -> Vec<u8> {
|
pub fn to_bytes(&self) -> Vec<u8> {
|
||||||
self.data.to_vec()
|
self.data.to_vec()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// A clone of the internal representation of the decoded data.
|
||||||
|
pub fn to_vec(&self) -> Vec<u8> {
|
||||||
|
self.data.to_vec()
|
||||||
|
}
|
||||||
|
|
||||||
/// Conver the Mnemonic into the internal representation of the decoded data.
|
/// Conver the Mnemonic into the internal representation of the decoded data.
|
||||||
pub fn into_bytes(self) -> Vec<u8> {
|
pub fn into_bytes(self) -> Vec<u8> {
|
||||||
self.data
|
self.data
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Conver the Mnemonic into the internal representation of the decoded data.
|
||||||
|
pub fn into_vec(self) -> Vec<u8> {
|
||||||
|
self.data
|
||||||
|
}
|
||||||
|
|
||||||
/// Clone the existing data.
|
/// Clone the existing data.
|
||||||
#[deprecated = "Use as_bytes(), to_bytes(), or into_bytes() instead"]
|
#[deprecated = "Use as_bytes(), to_bytes(), or into_bytes() instead"]
|
||||||
pub fn entropy(&self) -> Vec<u8> {
|
pub fn entropy(&self) -> Vec<u8> {
|
||||||
|
|
Loading…
Reference in New Issue