pub enum ProtocolMessage {
Show 17 variants
Probe([u8; 2]),
ProbeResponse(ProbeResponse),
Relay(RelayRequest),
RelayResponse(RelayResponse),
Tunnel(TunnelRequest),
TunnelResponse(TunnelResponse),
Noise(Noise),
Start(StartProtocol),
ServerHello(ServerHello),
ClientAuth(ClientAuth),
AuthResult(AuthResult),
ExtRequest(ExtRequest),
ExtResponse(ExtResponse),
AdminResponse(AdminResponse),
ClientMessage(ClientMessage),
AppMessage(AppMessage),
CoreMessage(CoreMessage),
}
Variants§
Probe([u8; 2])
ProbeResponse(ProbeResponse)
Relay(RelayRequest)
RelayResponse(RelayResponse)
Tunnel(TunnelRequest)
TunnelResponse(TunnelResponse)
Noise(Noise)
Start(StartProtocol)
ServerHello(ServerHello)
ClientAuth(ClientAuth)
AuthResult(AuthResult)
ExtRequest(ExtRequest)
ExtResponse(ExtResponse)
AdminResponse(AdminResponse)
ClientMessage(ClientMessage)
AppMessage(AppMessage)
CoreMessage(CoreMessage)
Implementations§
Source§impl ProtocolMessage
impl ProtocolMessage
pub fn id(&self) -> Option<i64>
pub fn set_id(&mut self, id: i64)
pub fn type_id(&self) -> TypeId
pub fn get_actor(&self) -> Box<dyn EActor>
pub fn from_client_response_err(err: ServerError) -> ProtocolMessage
pub fn from_client_request_v0( req: ClientRequestContentV0, overlay: OverlayId, ) -> ProtocolMessage
pub fn is_block(&self) -> bool
Trait Implementations§
Source§impl Clone for ProtocolMessage
impl Clone for ProtocolMessage
Source§fn clone(&self) -> ProtocolMessage
fn clone(&self) -> ProtocolMessage
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ProtocolMessage
impl Debug for ProtocolMessage
Source§impl<'de> Deserialize<'de> for ProtocolMessage
impl<'de> Deserialize<'de> for ProtocolMessage
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<()> for ProtocolMessage
impl From<()> for ProtocolMessage
Source§fn from(_msg: ()) -> ProtocolMessage
fn from(_msg: ()) -> ProtocolMessage
Converts to this type from the input type.
Source§impl From<AddInvitation> for ProtocolMessage
impl From<AddInvitation> for ProtocolMessage
Source§fn from(_msg: AddInvitation) -> ProtocolMessage
fn from(_msg: AddInvitation) -> ProtocolMessage
Converts to this type from the input type.
Source§impl From<AddUser> for ProtocolMessage
impl From<AddUser> for ProtocolMessage
Source§fn from(_msg: AddUser) -> ProtocolMessage
fn from(_msg: AddUser) -> ProtocolMessage
Converts to this type from the input type.
Source§impl From<AdminRequest> for ProtocolMessage
impl From<AdminRequest> for ProtocolMessage
Source§fn from(msg: AdminRequest) -> ProtocolMessage
fn from(msg: AdminRequest) -> ProtocolMessage
Converts to this type from the input type.
Source§impl From<AdminResponse> for ProtocolMessage
impl From<AdminResponse> for ProtocolMessage
Source§fn from(msg: AdminResponse) -> ProtocolMessage
fn from(msg: AdminResponse) -> ProtocolMessage
Converts to this type from the input type.
Source§impl From<AdminResponseV0> for ProtocolMessage
impl From<AdminResponseV0> for ProtocolMessage
Source§fn from(msg: AdminResponseV0) -> ProtocolMessage
fn from(msg: AdminResponseV0) -> ProtocolMessage
Converts to this type from the input type.
Source§impl From<AppMessage> for ProtocolMessage
impl From<AppMessage> for ProtocolMessage
Source§fn from(msg: AppMessage) -> ProtocolMessage
fn from(msg: AppMessage) -> ProtocolMessage
Converts to this type from the input type.
Source§impl From<AppMessageContentV0> for ProtocolMessage
impl From<AppMessageContentV0> for ProtocolMessage
Source§fn from(content: AppMessageContentV0) -> ProtocolMessage
fn from(content: AppMessageContentV0) -> ProtocolMessage
Converts to this type from the input type.
Source§impl From<AuthResult> for ProtocolMessage
impl From<AuthResult> for ProtocolMessage
Source§fn from(msg: AuthResult) -> ProtocolMessage
fn from(msg: AuthResult) -> ProtocolMessage
Converts to this type from the input type.
Source§impl From<Block> for ProtocolMessage
impl From<Block> for ProtocolMessage
Source§fn from(b: Block) -> ProtocolMessage
fn from(b: Block) -> ProtocolMessage
Converts to this type from the input type.
Source§impl From<BlocksExist> for ProtocolMessage
impl From<BlocksExist> for ProtocolMessage
Source§fn from(msg: BlocksExist) -> ProtocolMessage
fn from(msg: BlocksExist) -> ProtocolMessage
Converts to this type from the input type.
Source§impl From<BlocksFound> for ProtocolMessage
impl From<BlocksFound> for ProtocolMessage
Source§fn from(b: BlocksFound) -> ProtocolMessage
fn from(b: BlocksFound) -> ProtocolMessage
Converts to this type from the input type.
Source§impl From<BlocksGet> for ProtocolMessage
impl From<BlocksGet> for ProtocolMessage
Source§fn from(msg: BlocksGet) -> ProtocolMessage
fn from(msg: BlocksGet) -> ProtocolMessage
Converts to this type from the input type.
Source§impl From<BlocksPut> for ProtocolMessage
impl From<BlocksPut> for ProtocolMessage
Source§fn from(msg: BlocksPut) -> ProtocolMessage
fn from(msg: BlocksPut) -> ProtocolMessage
Converts to this type from the input type.
Source§impl From<ClientAuth> for ProtocolMessage
impl From<ClientAuth> for ProtocolMessage
Source§fn from(msg: ClientAuth) -> ProtocolMessage
fn from(msg: ClientAuth) -> ProtocolMessage
Converts to this type from the input type.
Source§impl From<ClientResponse> for ProtocolMessage
impl From<ClientResponse> for ProtocolMessage
Source§fn from(msg: ClientResponse) -> ProtocolMessage
fn from(msg: ClientResponse) -> ProtocolMessage
Converts to this type from the input type.
Source§impl From<ClientResponseContentV0> for ProtocolMessage
impl From<ClientResponseContentV0> for ProtocolMessage
Source§fn from(msg: ClientResponseContentV0) -> ProtocolMessage
fn from(msg: ClientResponseContentV0) -> ProtocolMessage
Converts to this type from the input type.
Source§impl From<CommitGet> for ProtocolMessage
impl From<CommitGet> for ProtocolMessage
Source§fn from(msg: CommitGet) -> ProtocolMessage
fn from(msg: CommitGet) -> ProtocolMessage
Converts to this type from the input type.
Source§impl From<CoreBrokerConnect> for ProtocolMessage
impl From<CoreBrokerConnect> for ProtocolMessage
Source§fn from(_msg: CoreBrokerConnect) -> ProtocolMessage
fn from(_msg: CoreBrokerConnect) -> ProtocolMessage
Converts to this type from the input type.
Source§impl From<DelUser> for ProtocolMessage
impl From<DelUser> for ProtocolMessage
Source§fn from(_msg: DelUser) -> ProtocolMessage
fn from(_msg: DelUser) -> ProtocolMessage
Converts to this type from the input type.
Source§impl From<ExtObjectGetV0> for ProtocolMessage
impl From<ExtObjectGetV0> for ProtocolMessage
Source§fn from(_msg: ExtObjectGetV0) -> ProtocolMessage
fn from(_msg: ExtObjectGetV0) -> ProtocolMessage
Converts to this type from the input type.
Source§impl From<ExtResponseV0> for ProtocolMessage
impl From<ExtResponseV0> for ProtocolMessage
Source§fn from(msg: ExtResponseV0) -> ProtocolMessage
fn from(msg: ExtResponseV0) -> ProtocolMessage
Converts to this type from the input type.
Source§impl From<ExtWalletGetExportV0> for ProtocolMessage
impl From<ExtWalletGetExportV0> for ProtocolMessage
Source§fn from(_msg: ExtWalletGetExportV0) -> ProtocolMessage
fn from(_msg: ExtWalletGetExportV0) -> ProtocolMessage
Converts to this type from the input type.
Source§impl From<ListInvitations> for ProtocolMessage
impl From<ListInvitations> for ProtocolMessage
Source§fn from(_msg: ListInvitations) -> ProtocolMessage
fn from(_msg: ListInvitations) -> ProtocolMessage
Converts to this type from the input type.
Source§impl From<ListUsers> for ProtocolMessage
impl From<ListUsers> for ProtocolMessage
Source§fn from(_msg: ListUsers) -> ProtocolMessage
fn from(_msg: ListUsers) -> ProtocolMessage
Converts to this type from the input type.
Source§impl From<PinRepo> for ProtocolMessage
impl From<PinRepo> for ProtocolMessage
Source§fn from(msg: PinRepo) -> ProtocolMessage
fn from(msg: PinRepo) -> ProtocolMessage
Converts to this type from the input type.
Source§impl From<PubKey> for ProtocolMessage
impl From<PubKey> for ProtocolMessage
Source§fn from(_msg: UserId) -> ProtocolMessage
fn from(_msg: UserId) -> ProtocolMessage
Converts to this type from the input type.
Source§impl From<PublishEvent> for ProtocolMessage
impl From<PublishEvent> for ProtocolMessage
Source§fn from(msg: PublishEvent) -> ProtocolMessage
fn from(msg: PublishEvent) -> ProtocolMessage
Converts to this type from the input type.
Source§impl From<RepoPinStatus> for ProtocolMessage
impl From<RepoPinStatus> for ProtocolMessage
Source§fn from(res: RepoPinStatus) -> ProtocolMessage
fn from(res: RepoPinStatus) -> ProtocolMessage
Converts to this type from the input type.
Source§impl From<RepoPinStatusReq> for ProtocolMessage
impl From<RepoPinStatusReq> for ProtocolMessage
Source§fn from(msg: RepoPinStatusReq) -> ProtocolMessage
fn from(msg: RepoPinStatusReq) -> ProtocolMessage
Converts to this type from the input type.
Source§impl<A> From<Result<A, ServerError>> for ProtocolMessage
impl<A> From<Result<A, ServerError>> for ProtocolMessage
Source§fn from(res: Result<A, ServerError>) -> ProtocolMessage
fn from(res: Result<A, ServerError>) -> ProtocolMessage
Converts to this type from the input type.
Source§impl From<Result<EmptyAppResponse, ServerError>> for ProtocolMessage
impl From<Result<EmptyAppResponse, ServerError>> for ProtocolMessage
Source§fn from(res: Result<EmptyAppResponse, ServerError>) -> ProtocolMessage
fn from(res: Result<EmptyAppResponse, ServerError>) -> ProtocolMessage
Converts to this type from the input type.
Source§impl From<TopicSub> for ProtocolMessage
impl From<TopicSub> for ProtocolMessage
Source§fn from(msg: TopicSub) -> ProtocolMessage
fn from(msg: TopicSub) -> ProtocolMessage
Converts to this type from the input type.
Source§impl From<TopicSubRes> for ProtocolMessage
impl From<TopicSubRes> for ProtocolMessage
Source§fn from(res: TopicSubRes) -> ProtocolMessage
fn from(res: TopicSubRes) -> ProtocolMessage
Converts to this type from the input type.
Source§impl From<TopicSyncReq> for ProtocolMessage
impl From<TopicSyncReq> for ProtocolMessage
Source§fn from(msg: TopicSyncReq) -> ProtocolMessage
fn from(msg: TopicSyncReq) -> ProtocolMessage
Converts to this type from the input type.
Source§impl From<TopicSyncRes> for ProtocolMessage
impl From<TopicSyncRes> for ProtocolMessage
Source§fn from(b: TopicSyncRes) -> ProtocolMessage
fn from(b: TopicSyncRes) -> ProtocolMessage
Converts to this type from the input type.
Source§impl From<Vec<TopicSubRes>> for ProtocolMessage
impl From<Vec<TopicSubRes>> for ProtocolMessage
Source§fn from(res: RepoOpened) -> ProtocolMessage
fn from(res: RepoOpened) -> ProtocolMessage
Converts to this type from the input type.
Source§impl From<WalletPutExport> for ProtocolMessage
impl From<WalletPutExport> for ProtocolMessage
Source§fn from(msg: WalletPutExport) -> ProtocolMessage
fn from(msg: WalletPutExport) -> ProtocolMessage
Converts to this type from the input type.
Source§impl Serialize for ProtocolMessage
impl Serialize for ProtocolMessage
Source§impl TryFrom<&ProtocolMessage> for ServerError
impl TryFrom<&ProtocolMessage> for ServerError
Source§impl TryFrom<ProtocolMessage> for ()
impl TryFrom<ProtocolMessage> for ()
Source§type Error = ProtocolError
type Error = ProtocolError
The type returned in the event of a conversion error.
Source§impl TryFrom<ProtocolMessage> for AddInvitation
impl TryFrom<ProtocolMessage> for AddInvitation
Source§type Error = ProtocolError
type Error = ProtocolError
The type returned in the event of a conversion error.
Source§impl TryFrom<ProtocolMessage> for AddUser
impl TryFrom<ProtocolMessage> for AddUser
Source§type Error = ProtocolError
type Error = ProtocolError
The type returned in the event of a conversion error.
Source§impl TryFrom<ProtocolMessage> for AdminResponse
impl TryFrom<ProtocolMessage> for AdminResponse
Source§type Error = ProtocolError
type Error = ProtocolError
The type returned in the event of a conversion error.
Source§impl TryFrom<ProtocolMessage> for AppMessageContentV0
impl TryFrom<ProtocolMessage> for AppMessageContentV0
Source§type Error = ProtocolError
type Error = ProtocolError
The type returned in the event of a conversion error.
Source§impl TryFrom<ProtocolMessage> for Block
impl TryFrom<ProtocolMessage> for Block
Source§type Error = ProtocolError
type Error = ProtocolError
The type returned in the event of a conversion error.
Source§impl TryFrom<ProtocolMessage> for BlocksExist
impl TryFrom<ProtocolMessage> for BlocksExist
Source§type Error = ProtocolError
type Error = ProtocolError
The type returned in the event of a conversion error.
Source§impl TryFrom<ProtocolMessage> for BlocksFound
impl TryFrom<ProtocolMessage> for BlocksFound
Source§type Error = ProtocolError
type Error = ProtocolError
The type returned in the event of a conversion error.
Source§impl TryFrom<ProtocolMessage> for BlocksGet
impl TryFrom<ProtocolMessage> for BlocksGet
Source§type Error = ProtocolError
type Error = ProtocolError
The type returned in the event of a conversion error.
Source§impl TryFrom<ProtocolMessage> for BlocksPut
impl TryFrom<ProtocolMessage> for BlocksPut
Source§type Error = ProtocolError
type Error = ProtocolError
The type returned in the event of a conversion error.
Source§impl TryFrom<ProtocolMessage> for ClientRequestContentV0
impl TryFrom<ProtocolMessage> for ClientRequestContentV0
Source§type Error = ProtocolError
type Error = ProtocolError
The type returned in the event of a conversion error.
Source§impl TryFrom<ProtocolMessage> for ClientResponseContentV0
impl TryFrom<ProtocolMessage> for ClientResponseContentV0
Source§type Error = ProtocolError
type Error = ProtocolError
The type returned in the event of a conversion error.
Source§impl TryFrom<ProtocolMessage> for CommitGet
impl TryFrom<ProtocolMessage> for CommitGet
Source§type Error = ProtocolError
type Error = ProtocolError
The type returned in the event of a conversion error.
Source§impl TryFrom<ProtocolMessage> for CoreBrokerConnectResponse
impl TryFrom<ProtocolMessage> for CoreBrokerConnectResponse
Source§type Error = ProtocolError
type Error = ProtocolError
The type returned in the event of a conversion error.
Source§impl TryFrom<ProtocolMessage> for DelUser
impl TryFrom<ProtocolMessage> for DelUser
Source§type Error = ProtocolError
type Error = ProtocolError
The type returned in the event of a conversion error.
Source§impl TryFrom<ProtocolMessage> for EmptyAppResponse
impl TryFrom<ProtocolMessage> for EmptyAppResponse
Source§type Error = ProtocolError
type Error = ProtocolError
The type returned in the event of a conversion error.
Source§impl TryFrom<ProtocolMessage> for ExportedWallet
impl TryFrom<ProtocolMessage> for ExportedWallet
Source§type Error = ProtocolError
type Error = ProtocolError
The type returned in the event of a conversion error.
Source§fn try_from(msg: ProtocolMessage) -> Result<ExportedWallet, Self::Error>
fn try_from(msg: ProtocolMessage) -> Result<ExportedWallet, Self::Error>
Performs the conversion.
Source§impl TryFrom<ProtocolMessage> for ExtObjectGetV0
impl TryFrom<ProtocolMessage> for ExtObjectGetV0
Source§type Error = ProtocolError
type Error = ProtocolError
The type returned in the event of a conversion error.
Source§impl TryFrom<ProtocolMessage> for ExtResponse
impl TryFrom<ProtocolMessage> for ExtResponse
Source§type Error = ProtocolError
type Error = ProtocolError
The type returned in the event of a conversion error.
Source§impl TryFrom<ProtocolMessage> for ExtResponseContentV0
impl TryFrom<ProtocolMessage> for ExtResponseContentV0
Source§type Error = ProtocolError
type Error = ProtocolError
The type returned in the event of a conversion error.
Source§impl TryFrom<ProtocolMessage> for ExtWalletGetExportV0
impl TryFrom<ProtocolMessage> for ExtWalletGetExportV0
Source§type Error = ProtocolError
type Error = ProtocolError
The type returned in the event of a conversion error.
Source§impl TryFrom<ProtocolMessage> for ListInvitations
impl TryFrom<ProtocolMessage> for ListInvitations
Source§type Error = ProtocolError
type Error = ProtocolError
The type returned in the event of a conversion error.
Source§impl TryFrom<ProtocolMessage> for ListUsers
impl TryFrom<ProtocolMessage> for ListUsers
Source§type Error = ProtocolError
type Error = ProtocolError
The type returned in the event of a conversion error.
Source§impl TryFrom<ProtocolMessage> for PinRepo
impl TryFrom<ProtocolMessage> for PinRepo
Source§type Error = ProtocolError
type Error = ProtocolError
The type returned in the event of a conversion error.
Source§impl TryFrom<ProtocolMessage> for ProbeResponse
impl TryFrom<ProtocolMessage> for ProbeResponse
Source§type Error = ProtocolError
type Error = ProtocolError
The type returned in the event of a conversion error.
Source§impl TryFrom<ProtocolMessage> for UserId
impl TryFrom<ProtocolMessage> for UserId
Source§type Error = ProtocolError
type Error = ProtocolError
The type returned in the event of a conversion error.
Source§impl TryFrom<ProtocolMessage> for PublishEvent
impl TryFrom<ProtocolMessage> for PublishEvent
Source§type Error = ProtocolError
type Error = ProtocolError
The type returned in the event of a conversion error.
Source§impl TryFrom<ProtocolMessage> for RepoPinStatus
impl TryFrom<ProtocolMessage> for RepoPinStatus
Source§type Error = ProtocolError
type Error = ProtocolError
The type returned in the event of a conversion error.
Source§impl TryFrom<ProtocolMessage> for RepoPinStatusReq
impl TryFrom<ProtocolMessage> for RepoPinStatusReq
Source§type Error = ProtocolError
type Error = ProtocolError
The type returned in the event of a conversion error.
Source§impl TryFrom<ProtocolMessage> for TopicSub
impl TryFrom<ProtocolMessage> for TopicSub
Source§type Error = ProtocolError
type Error = ProtocolError
The type returned in the event of a conversion error.
Source§impl TryFrom<ProtocolMessage> for TopicSubRes
impl TryFrom<ProtocolMessage> for TopicSubRes
Source§type Error = ProtocolError
type Error = ProtocolError
The type returned in the event of a conversion error.
Source§impl TryFrom<ProtocolMessage> for TopicSyncReq
impl TryFrom<ProtocolMessage> for TopicSyncReq
Source§type Error = ProtocolError
type Error = ProtocolError
The type returned in the event of a conversion error.
Source§impl TryFrom<ProtocolMessage> for TopicSyncRes
impl TryFrom<ProtocolMessage> for TopicSyncRes
Source§type Error = ProtocolError
type Error = ProtocolError
The type returned in the event of a conversion error.
Source§impl TryFrom<ProtocolMessage> for RepoOpened
impl TryFrom<ProtocolMessage> for RepoOpened
Source§type Error = ProtocolError
type Error = ProtocolError
The type returned in the event of a conversion error.
Source§impl TryFrom<ProtocolMessage> for WalletPutExport
impl TryFrom<ProtocolMessage> for WalletPutExport
Source§type Error = ProtocolError
type Error = ProtocolError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Freeze for ProtocolMessage
impl RefUnwindSafe for ProtocolMessage
impl Send for ProtocolMessage
impl Sync for ProtocolMessage
impl Unpin for ProtocolMessage
impl UnwindSafe for ProtocolMessage
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§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more