pub struct IcPacket {
pub header: Option<String>,
pub body: Option<Vec<u8>>,
pub cached: bool,
}
Expand description
An IcPacket is the method of communication to and from IcServer
instances.
Fields§
§header: Option<String>
Header of the packet. Used for the Command or as a response.
body: Option<Vec<u8>>
Body of the packet. Used for the Command data or as response data.
cached: bool
set to true if body is cached.
Implementations§
Source§impl IcPacket
impl IcPacket
Sourcepub fn new(h: Option<String>, d: Option<Vec<u8>>) -> IcPacket
pub fn new(h: Option<String>, d: Option<Vec<u8>>) -> IcPacket
Construct new packet from h
for the header and d
for the body
pub fn new_cached(h: Option<String>, d: Option<Vec<u8>>) -> IcPacket
pub fn new_denied() -> IcPacket
Sourcepub fn parse_header(&self) -> Vec<String>
pub fn parse_header(&self) -> Vec<String>
Returns a parsed header.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for IcPacket
impl RefUnwindSafe for IcPacket
impl Send for IcPacket
impl Sync for IcPacket
impl Unpin for IcPacket
impl UnwindSafe for IcPacket
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> 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> IntoSql for T
impl<T> IntoSql for T
Source§fn into_sql<T>(self) -> Self::Expressionwhere
Self: Sized + AsExpression<T>,
fn into_sql<T>(self) -> Self::Expressionwhere
Self: Sized + AsExpression<T>,
Convert
self
to an expression for Diesel’s query builder. Read moreSource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expressionwhere
&'a Self: AsExpression<T>,
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expressionwhere
&'a Self: AsExpression<T>,
Convert
&self
to an expression for Diesel’s query builder. Read more