pub struct Gtk {
pub bytes: Box<[u8]>,
/* private fields */
}
Fields§
§bytes: Box<[u8]>
Implementations§
Source§impl Gtk
impl Gtk
pub fn generate_random( cipher: Cipher, key_id: u8, key_rsc: u64, ) -> Result<Gtk, Error>
pub fn from_bytes( gtk_bytes: Box<[u8]>, cipher: Cipher, key_id: u8, key_rsc: u64, ) -> Result<Gtk, Error>
pub fn cipher(&self) -> &Cipher
pub fn key_id(&self) -> u8
pub fn key_rsc(&self) -> u64
Trait Implementations§
Source§impl Hash for Gtk
impl Hash for Gtk
Custom Hash implementation which doesn’t take the RSC or cipher suite into consideration.
Make sure to check that this property is upheld: v1 == v2 => hash(v1) == hash(v2)
Source§impl PartialEq for Gtk
impl PartialEq for Gtk
PartialEq implementation is the same as the default derive(PartialEq) We explicitly implement it here because we have a custom Hash implementation, and clippy requires that both PartialEq and Hash are either derive together or have custom implementations together.
impl Eq for Gtk
Auto Trait Implementations§
impl Freeze for Gtk
impl RefUnwindSafe for Gtk
impl Send for Gtk
impl Sync for Gtk
impl Unpin for Gtk
impl UnwindSafe for Gtk
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)