pub enum ServerCommand {
GetFreePort((Option<u16>, Option<u16>)),
Prealloc(u64, String),
ReceiveData(u32, String, Option<CompressionVariant>),
EndOfTransfer,
IsDestinationValid(DestinationMode, String),
}
Expand description
Defines commands a QFT client can issue to a QFT server
Variants§
GetFreePort((Option<u16>, Option<u16>))
Prealloc(u64, String)
ReceiveData(u32, String, Option<CompressionVariant>)
EndOfTransfer
IsDestinationValid(DestinationMode, String)
Implementations§
Source§impl ServerCommand
impl ServerCommand
Sourcepub const HEADER_SIZE: usize = 1usize
pub const HEADER_SIZE: usize = 1usize
The length of the command header that describes how long the command is (in bytes).
§Note
TODO: Revisit this before 1.0
Sourcepub fn size_from_bytes(raw_header: [u8; 1]) -> usize
pub fn size_from_bytes(raw_header: [u8; 1]) -> usize
Takes an array of bytes describing the header size and returns how size of the incoming command in bytes
Trait Implementations§
Source§impl Debug for ServerCommand
impl Debug for ServerCommand
Source§impl<'de> Deserialize<'de> for ServerCommand
impl<'de> Deserialize<'de> for ServerCommand
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 IntoEnumIterator for ServerCommand
impl IntoEnumIterator for ServerCommand
type Iterator = ServerCommandIter
fn iter() -> ServerCommandIter ⓘ
Auto Trait Implementations§
impl Freeze for ServerCommand
impl RefUnwindSafe for ServerCommand
impl Send for ServerCommand
impl Sync for ServerCommand
impl Unpin for ServerCommand
impl UnwindSafe for ServerCommand
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> 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