Struct czmq::ZCert
[−]
[src]
pub struct ZCert { /* fields omitted */ }
Methods
impl ZCert
[src]
fn new() -> Result<ZCert>
fn from_keys(public_key: &[u8], secret_key: &[u8]) -> ZCert
fn from_txt(public_txt: &str, secret_txt: &str) -> Result<ZCert>
fn load<P: AsRef<Path>>(path: P) -> Result<ZCert>
fn public_key<'a>(&'a self) -> &'a [u8]
fn secret_key<'a>(&'a self) -> &'a [u8]
fn public_txt<'a>(&'a self) -> &'a str
fn secret_txt<'a>(&'a self) -> &'a str
fn set_meta(&self, key: &str, value: &str)
fn meta(&self, key: &str) -> Option<Result<String, Vec<u8>>>
fn meta_keys(&self) -> ZList<&'static str>
fn encode_meta(&self) -> Vec<u8>
Encode certificate metadata into ZMQ wire format.
let cert = ZCert::new().unwrap(); cert.set_meta("key", "value"); let encoded = cert.encode_meta(); let frame = ZFrame::new(&encoded).unwrap(); frame.send(&mut sock, None).unwrap();
fn decode_meta(&self, encoded: &[u8]) -> Result<()>
Decode and set certificate metadata from ZMQ wire format.
let frame = ZFrame::recv(&mut sock).unwrap(); let encoded = match frame.data().unwrap() { Ok(str) => str.into_bytes(), Err(bytes) => bytes, }; let cert = ZCert::new().unwrap(); cert.decode_meta(&encoded).unwrap();
fn save<P: AsRef<Path>>(&self, path: P) -> Result<()>
fn save_public<P: AsRef<Path>>(&self, path: P) -> Result<()>
fn save_secret<P: AsRef<Path>>(&self, path: P) -> Result<()>
fn apply<S: Sockish>(&self, sock: &mut S)
fn dup(&self) -> ZCert
fn eq(&self, cert: &ZCert) -> bool
fn print(&self)
Trait Implementations
impl Debug for ZCert
[src]
impl Eq for ZCert
[src]
impl Send for ZCert
[src]
impl Sync for ZCert
[src]
impl Drop for ZCert
[src]
impl PartialEq for ZCert
[src]
fn eq(&self, other: &ZCert) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.