pub struct Request { /* private fields */ }Implementations
sourceimpl Request
impl Request
sourcepub fn encrypt(
&mut self,
data: String,
public_key: Vec<u8>
) -> Result<Vec<u8>, Error>
pub fn encrypt(
&mut self,
data: String,
public_key: Vec<u8>
) -> Result<Vec<u8>, Error>
Encrypts a message with a given public key
sourcepub fn get_message(&self) -> Option<Vec<u8>>
pub fn get_message(&self) -> Option<Vec<u8>>
Returns the message, if it has been set
sourcepub fn encrypt_with_nonce(
&mut self,
data: String,
public_key: Vec<u8>,
nonce: Option<Vec<u8>>,
version: Option<i32>
) -> Result<Vec<u8>, Error>
pub fn encrypt_with_nonce(
&mut self,
data: String,
public_key: Vec<u8>,
nonce: Option<Vec<u8>>,
version: Option<i32>
) -> Result<Vec<u8>, Error>
Encrypts a message with a given public key, none, and version identifier
Auto Trait Implementations
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnwindSafe for Request
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more