pub struct BorshServerMessageHeader<Ops, Id> {
pub id: Option<Id>,
pub kind: ServerMessageKind,
pub op: Option<Ops>,
}
Fields§
§id: Option<Id>
§kind: ServerMessageKind
§op: Option<Ops>
Implementations§
Source§impl<Ops, Id> BorshServerMessageHeader<Ops, Id>
impl<Ops, Id> BorshServerMessageHeader<Ops, Id>
pub fn new(id: Option<Id>, kind: ServerMessageKind, op: Option<Ops>) -> Self
Trait Implementations§
Source§impl<Ops, Id> BorshDeserialize for BorshServerMessageHeader<Ops, Id>where
Ops: BorshDeserialize,
Id: BorshDeserialize,
impl<Ops, Id> BorshDeserialize for BorshServerMessageHeader<Ops, Id>where
Ops: BorshDeserialize,
Id: BorshDeserialize,
fn deserialize_reader<__R: Read>(reader: &mut __R) -> Result<Self, Error>
Source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
Source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl<Ops, Id> BorshSerialize for BorshServerMessageHeader<Ops, Id>where
Ops: BorshSerialize,
Id: BorshSerialize,
impl<Ops, Id> BorshSerialize for BorshServerMessageHeader<Ops, Id>where
Ops: BorshSerialize,
Id: BorshSerialize,
Auto Trait Implementations§
impl<Ops, Id> Freeze for BorshServerMessageHeader<Ops, Id>
impl<Ops, Id> RefUnwindSafe for BorshServerMessageHeader<Ops, Id>where
Id: RefUnwindSafe,
Ops: RefUnwindSafe,
impl<Ops, Id> Send for BorshServerMessageHeader<Ops, Id>
impl<Ops, Id> Sync for BorshServerMessageHeader<Ops, Id>
impl<Ops, Id> Unpin for BorshServerMessageHeader<Ops, Id>
impl<Ops, Id> UnwindSafe for BorshServerMessageHeader<Ops, Id>where
Id: UnwindSafe,
Ops: UnwindSafe,
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.