Struct moras::remote::server::ServerHandle
source · struct ServerHandle {
window: Option<Window>,
map_state: Mutex<(String, Option<Ptr<TabMap>>)>,
password: Mutex<String>,
clients: Mutex<Vec<SocketAddr>>,
cursor_list: Arc<Mutex<LinkedList<ClientCursor>>>,
history: Arc<Mutex<Vec<Modification>>>,
}
Fields§
§window: Option<Window>
§map_state: Mutex<(String, Option<Ptr<TabMap>>)>
§password: Mutex<String>
§clients: Mutex<Vec<SocketAddr>>
§cursor_list: Arc<Mutex<LinkedList<ClientCursor>>>
§history: Arc<Mutex<Vec<Modification>>>
Implementations§
source§impl ServerHandle
impl ServerHandle
sourcefn change_password(&self, password: &str)
fn change_password(&self, password: &str)
Change password for server.
sourcefn set_host_cursor(&mut self, row: u64, col: u64, port: u16)
fn set_host_cursor(&mut self, row: u64, col: u64, port: u16)
Update host cursor position.
sourcefn handle_with_cur_tab<F, R>(&self, handle: F) -> Result<R, String>
fn handle_with_cur_tab<F, R>(&self, handle: F) -> Result<R, String>
Handle logic current tab wht a &mut Tab
as lambda parameter.
Only use to bypass the fucking borrow checker.
fn handle_rpc_with_cur_tab<F, R>( &self, handle: F, ) -> Result<Response<R>, Status>
fn get_history_since<T>(&self, start_version: usize) -> Vec<T>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for ServerHandle
impl !RefUnwindSafe for ServerHandle
impl Send for ServerHandle
impl Sync for ServerHandle
impl Unpin for ServerHandle
impl !UnwindSafe for ServerHandle
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request
§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.