[−][src]Struct tdn_permission::CAPermissionedGroup
Implementations
impl<P: Peer> CAPermissionedGroup<P>
[src]
pub fn new(
id: GroupId,
my_pk: P::PublicKey,
my_prove: P::Signature,
ca: P::PublicKey
) -> Self
[src]
id: GroupId,
my_pk: P::PublicKey,
my_prove: P::Signature,
ca: P::PublicKey
) -> Self
pub fn new_with_name(
id: GroupId,
my_pk: P::PublicKey,
my_prove: P::Signature,
ca: P::PublicKey,
my_name: impl ToString
) -> Self
[src]
id: GroupId,
my_pk: P::PublicKey,
my_prove: P::Signature,
ca: P::PublicKey,
my_name: impl ToString
) -> Self
pub fn peers(&self) -> Vec<&PeerAddr>
[src]
pub fn get_peer_addr(&self, name: &String) -> Option<&PeerAddr>
[src]
pub fn add(
&mut self,
peer_addr: PeerAddr,
pk: P::PublicKey,
sign: P::Signature,
addr: SocketAddr
)
[src]
&mut self,
peer_addr: PeerAddr,
pk: P::PublicKey,
sign: P::Signature,
addr: SocketAddr
)
directly add a peer to group.
pub fn join_bytes(&self) -> Vec<u8>
[src]
pub fn sign_prove(
sk: &P::SecretKey,
pk: &P::PublicKey
) -> Result<P::Signature, Box<dyn Error>>
[src]
sk: &P::SecretKey,
pk: &P::PublicKey
) -> Result<P::Signature, Box<dyn Error>>
pub async fn join<'_>(
&'_ mut self,
peer_addr: PeerAddr,
addr: SocketAddr,
join_bytes: Vec<u8>,
return_sender: Sender<SendMessage>
)
[src]
&'_ mut self,
peer_addr: PeerAddr,
addr: SocketAddr,
join_bytes: Vec<u8>,
return_sender: Sender<SendMessage>
)
join: when peer join will call
pub fn join_result(
&mut self,
peer_addr: PeerAddr,
is_ok: bool,
_join_result: Vec<u8>
)
[src]
&mut self,
peer_addr: PeerAddr,
is_ok: bool,
_join_result: Vec<u8>
)
pub fn leave(&mut self, peer_addr: &PeerAddr)
[src]
leave: when peer leave will call
Trait Implementations
impl<P: Debug + Peer> Debug for CAPermissionedGroup<P> where
P::PublicKey: Debug,
P::Signature: Debug,
P::PublicKey: Debug,
P::PublicKey: Debug,
P::Signature: Debug,
[src]
P::PublicKey: Debug,
P::Signature: Debug,
P::PublicKey: Debug,
P::PublicKey: Debug,
P::Signature: Debug,
impl<P: Default + Peer> Default for CAPermissionedGroup<P> where
P::PublicKey: Default,
P::Signature: Default,
P::PublicKey: Default,
P::PublicKey: Default,
P::Signature: Default,
[src]
P::PublicKey: Default,
P::Signature: Default,
P::PublicKey: Default,
P::PublicKey: Default,
P::Signature: Default,
fn default() -> CAPermissionedGroup<P>
[src]
impl<P: Peer> Group for CAPermissionedGroup<P>
[src]
Auto Trait Implementations
impl<P> RefUnwindSafe for CAPermissionedGroup<P> where
<P as Peer>::PublicKey: RefUnwindSafe,
<P as Peer>::Signature: RefUnwindSafe,
<P as Peer>::PublicKey: RefUnwindSafe,
<P as Peer>::Signature: RefUnwindSafe,
impl<P> Send for CAPermissionedGroup<P> where
<P as Peer>::PublicKey: Send,
<P as Peer>::Signature: Send,
<P as Peer>::PublicKey: Send,
<P as Peer>::Signature: Send,
impl<P> Sync for CAPermissionedGroup<P> where
<P as Peer>::PublicKey: Sync,
<P as Peer>::Signature: Sync,
<P as Peer>::PublicKey: Sync,
<P as Peer>::Signature: Sync,
impl<P> Unpin for CAPermissionedGroup<P> where
<P as Peer>::PublicKey: Unpin,
<P as Peer>::Signature: Unpin,
<P as Peer>::PublicKey: Unpin,
<P as Peer>::Signature: Unpin,
impl<P> UnwindSafe for CAPermissionedGroup<P> where
<P as Peer>::PublicKey: UnwindSafe,
<P as Peer>::Signature: UnwindSafe,
<P as Peer>::PublicKey: UnwindSafe,
<P as Peer>::Signature: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,