pub struct XvcInfo { /* private fields */ }Expand description
Contains static information about the server capabilities that are transferred between client and server in the beginning.
Implementations§
Source§impl XvcInfo
impl XvcInfo
Source§impl XvcInfo
impl XvcInfo
Sourcepub fn write_to(&self, writer: &mut impl Write) -> Result<()>
pub fn write_to(&self, writer: &mut impl Write) -> Result<()>
Write this XvcInfo to writer in the protocol’s server-info format.
The output has the form xvcServer_v<major>.<minor>:<max_vector_len>\n.
This is the canonical representation sent by servers to announce
capabilities to clients.
Sourcepub fn from_reader(reader: &mut impl Read) -> Result<XvcInfo, ReadError>
pub fn from_reader(reader: &mut impl Read) -> Result<XvcInfo, ReadError>
Read an XvcInfo from reader using an internal Decoder.
Example:
use std::io::Cursor;
let mut c = Cursor::new(b"xvcServer_v1.0:32\n");
let info = xvc_protocol::XvcInfo::from_reader(&mut c).unwrap();
assert_eq!(info.max_vector_len(), 32);Trait Implementations§
impl Eq for XvcInfo
impl StructuralPartialEq for XvcInfo
Auto Trait Implementations§
impl Freeze for XvcInfo
impl RefUnwindSafe for XvcInfo
impl Send for XvcInfo
impl Sync for XvcInfo
impl Unpin for XvcInfo
impl UnsafeUnpin for XvcInfo
impl UnwindSafe for XvcInfo
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