Enum Command
pub enum Command {
GetVersion,
ListDevices,
GetWatchPolicy,
SetWatchPolicy(Watch),
Poll,
GetDevice,
SetDevice(Device),
}Expand description
Commands that can be sent to the gpsd server.
Variants§
GetVersion
Gets the version of the gpsd server.
The server will respond with a Version
object.
ListDevices
Lists all devices that gpsd knows about.
The server will respond with a Devices
object.
GetWatchPolicy
Gets the current watch policy.
The server will respond with a Watch object.
SetWatchPolicy(Watch)
Poll
Requests data from the last-seen fixes on all active GPS devices.
Devices must previously have their watch policy set to enabled to be pollable.
The server will respond with a Poll
object.
GetDevice
Reports the state of a device.
The server will respond with a Device object.
SetDevice(Device)
Sets device-specific control bits.
The server will respond with a Device object.
Implementations§
§impl Command
impl Command
pub fn set_watch_policy() -> SetWatchPolicyBuilder
pub fn set_watch_policy() -> SetWatchPolicyBuilder
Creates a new builder for the command.
Trait Implementations§
§impl Encoder<Command> for ObjectCodec
impl Encoder<Command> for ObjectCodec
§impl Sink<Command> for Channel
impl Sink<Command> for Channel
§fn poll_ready(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
) -> Poll<Result<(), Self::Error>>
fn poll_ready( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Result<(), Self::Error>>
Attempts to prepare the
Sink to receive a value. Read more§fn start_send(self: Pin<&mut Self>, item: Command) -> Result<(), Self::Error>
fn start_send(self: Pin<&mut Self>, item: Command) -> Result<(), Self::Error>
Begin the process of sending a value to the sink.
Each call to this function must be preceded by a successful call to
poll_ready which returned Poll::Ready(Ok(())). Read moreAuto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnsafeUnpin for Command
impl UnwindSafe for Command
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