reduce visibility of some structs

This commit is contained in:
Ferdinand Schober
2024-07-14 14:32:11 +02:00
parent 8fa4ea530a
commit a7e7941806
6 changed files with 15 additions and 15 deletions

View File

@@ -19,7 +19,7 @@ use crate::{client::ClientHandle, frontend::Status, server::State};
use super::Server;
#[derive(Debug, Error)]
pub enum LanMouseCaptureError {
pub(crate) enum LanMouseCaptureError {
#[error("error creating input-capture: `{0}`")]
Create(#[from] CaptureCreationError),
#[error("error while capturing input: `{0}`")]
@@ -27,7 +27,7 @@ pub enum LanMouseCaptureError {
}
#[derive(Clone, Copy, Debug)]
pub enum CaptureEvent {
pub(crate) enum CaptureEvent {
/// capture must release the mouse
Release,
/// add a capture client
@@ -36,7 +36,7 @@ pub enum CaptureEvent {
Destroy(CaptureHandle),
}
pub fn new(
pub(crate) fn new(
server: Server,
capture_rx: Receiver<CaptureEvent>,
udp_send: Sender<(Event, SocketAddr)>,

View File

@@ -21,7 +21,7 @@ use input_event::{Event, KeyboardEvent};
use super::{network_task::NetworkError, CaptureEvent, Server};
#[derive(Clone, Debug)]
pub enum EmulationEvent {
pub(crate) enum EmulationEvent {
/// create a new client
Create(EmulationHandle),
/// destroy a client
@@ -30,7 +30,7 @@ pub enum EmulationEvent {
ReleaseKeys(ClientHandle),
}
pub fn new(
pub(crate) fn new(
server: Server,
emulation_rx: Receiver<EmulationEvent>,
udp_rx: Receiver<Result<(Event, SocketAddr), NetworkError>>,

View File

@@ -11,7 +11,7 @@ use input_event::{Event, ProtocolError};
use super::Server;
pub async fn new(
pub(crate) async fn new(
server: Server,
udp_recv_tx: Sender<Result<(Event, SocketAddr), NetworkError>>,
udp_send_rx: Receiver<(Event, SocketAddr)>,

View File

@@ -10,7 +10,7 @@ use super::{capture_task::CaptureEvent, emulation_task::EmulationEvent, Server,
const MAX_RESPONSE_TIME: Duration = Duration::from_millis(500);
pub fn new(
pub(crate) fn new(
server: Server,
sender_ch: Sender<(Event, SocketAddr)>,
emulate_notify: Sender<EmulationEvent>,