Struct sphinx_glyph::control::Controller
source · [−]pub struct Controller(_, _, _, _);
Implementations
sourceimpl Controller
impl Controller
pub fn new(sk: SecretKey, pk: PublicKey, nonce: u64) -> Self
pub fn new_with_persister(
sk: SecretKey,
pk: PublicKey,
per: Arc<Mutex<dyn ControlPersist>>
) -> Self
pub fn make_auth_token(&self) -> Result<String>
pub fn pubkey(&self) -> PublicKey
pub fn nonce(&self) -> u64
pub fn build_msg(&mut self, msg: ControlMessage) -> Result<Vec<u8>>
pub fn build_response(&self, msg: ControlResponse) -> Result<Vec<u8>>
pub fn parse_msg(&mut self, input: &[u8]) -> Result<ControlMessage>
pub fn parse_msg_no_nonce(
&mut self,
input: &[u8]
) -> Result<(ControlMessage, u64)>
pub fn parse_response(&self, input: &[u8]) -> Result<ControlResponse>
pub fn handle(
&mut self,
input: &[u8]
) -> Result<(ControlMessage, ControlResponse)>
Auto Trait Implementations
impl RefUnwindSafe for Controller
impl Send for Controller
impl Sync for Controller
impl Unpin for Controller
impl UnwindSafe for Controller
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