Skip to main content

Message

Enum Message 

Source
pub enum Message<N: AsRef<str>, C: AsRef<[u8]>, E: AsRef<[Entry<N>]>> {
Show 31 variants RequestIdentify(RequestIdentify<N>), RequestOpen(RequestOpen<N>), RequestClose(RequestClose), RequestMetadata(RequestMetadata), RequestSetmeta(RequestSetmeta), RequestList(RequestList), RequestMake(RequestMake<N>), RequestRemove(RequestRemove<N>), RequestRead(RequestRead), RequestWrite(RequestWrite<C>), RequestSeek(RequestSeek), RequestTell(RequestTell), RequestCopy(RequestCopy), RequestLink(RequestLink<N>), RequestDrop(RequestDrop), ResponseError(ResponseError), ResponseIdentify(ResponseIdentify), ResponseOpen(ResponseOpen), ResponseClose(ResponseClose), ResponseMetadata(ResponseMetadata), ResponseSetmeta(ResponseSetmeta), ResponseList(ResponseList<N, E>), ResponseMake(ResponseMake), ResponseRemove(ResponseRemove), ResponseRead(ResponseRead<C>), ResponseWrite(ResponseWrite), ResponseSeek(ResponseSeek), ResponseTell(ResponseTell), ResponseCopy(ResponseCopy), ResponseLink(ResponseLink), ResponseDrop(ResponseDrop),
}

Variants§

§

RequestIdentify(RequestIdentify<N>)

§

RequestOpen(RequestOpen<N>)

§

RequestClose(RequestClose)

§

RequestMetadata(RequestMetadata)

§

RequestSetmeta(RequestSetmeta)

§

RequestList(RequestList)

§

RequestMake(RequestMake<N>)

§

RequestRemove(RequestRemove<N>)

§

RequestRead(RequestRead)

§

RequestWrite(RequestWrite<C>)

§

RequestSeek(RequestSeek)

§

RequestTell(RequestTell)

§

RequestCopy(RequestCopy)

§

RequestDrop(RequestDrop)

§

ResponseError(ResponseError)

§

ResponseIdentify(ResponseIdentify)

§

ResponseOpen(ResponseOpen)

§

ResponseClose(ResponseClose)

§

ResponseMetadata(ResponseMetadata)

§

ResponseSetmeta(ResponseSetmeta)

§

ResponseList(ResponseList<N, E>)

§

ResponseMake(ResponseMake)

§

ResponseRemove(ResponseRemove)

§

ResponseRead(ResponseRead<C>)

§

ResponseWrite(ResponseWrite)

§

ResponseSeek(ResponseSeek)

§

ResponseTell(ResponseTell)

§

ResponseCopy(ResponseCopy)

§

ResponseDrop(ResponseDrop)

Implementations§

Source§

impl<N: AsRef<str>, C: AsRef<[u8]>, E: AsRef<[Entry<N>]>> Message<N, C, E>

Source

pub fn to_slice<'ser>( &self, buf: &'ser mut [u8], ) -> Result<&'ser mut [u8], Error>
where N: Serialize, C: Serialize, E: Serialize,

Source

pub fn to_extend<W: Extend<u8>>(&self, writer: W) -> Result<W, Error>
where N: Serialize, C: Serialize, E: Serialize,

Source

pub fn from_bytes<'de>(s: &'de [u8]) -> Result<Self, Error>
where N: Deserialize<'de>, C: Deserialize<'de>, E: Deserialize<'de>,

Source

pub fn take_from_bytes<'de>(s: &'de [u8]) -> Result<(Self, &'de [u8]), Error>
where N: Deserialize<'de>, C: Deserialize<'de>, E: Deserialize<'de>,

Trait Implementations§

Source§

impl<N: Clone + AsRef<str>, C: Clone + AsRef<[u8]>, E: Clone + AsRef<[Entry<N>]>> Clone for Message<N, C, E>

Source§

fn clone(&self) -> Message<N, C, E>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<N: Debug + AsRef<str>, C: Debug + AsRef<[u8]>, E: Debug + AsRef<[Entry<N>]>> Debug for Message<N, C, E>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de, N, C, E> Deserialize<'de> for Message<N, C, E>
where N: Deserialize<'de> + AsRef<str>, C: Deserialize<'de> + AsRef<[u8]>, E: Deserialize<'de> + AsRef<[Entry<N>]>,

Source§

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<N: AsRef<str>, C: AsRef<[u8]>, E: AsRef<[Entry<N>]>> From<Request<N, C>> for Message<N, C, E>

Source§

fn from(value: Request<N, C>) -> Self

Converts to this type from the input type.
Source§

impl<N: AsRef<str>, C: AsRef<[u8]>, E: AsRef<[Entry<N>]>> From<Response<N, C, E>> for Message<N, C, E>

Source§

fn from(value: Response<N, C, E>) -> Self

Converts to this type from the input type.
Source§

impl<N: Hash + AsRef<str>, C: Hash + AsRef<[u8]>, E: Hash + AsRef<[Entry<N>]>> Hash for Message<N, C, E>

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<N: PartialEq + AsRef<str>, C: PartialEq + AsRef<[u8]>, E: PartialEq + AsRef<[Entry<N>]>> PartialEq for Message<N, C, E>

Source§

fn eq(&self, other: &Message<N, C, E>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<N, C, E> Serialize for Message<N, C, E>
where N: Serialize + AsRef<str>, C: Serialize + AsRef<[u8]>, E: Serialize + AsRef<[Entry<N>]>,

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<N: AsRef<str>, C: AsRef<[u8]>, E: AsRef<[Entry<N>]>> TryFrom<Message<N, C, E>> for Request<N, C>

Source§

type Error = Message<N, C, E>

The type returned in the event of a conversion error.
Source§

fn try_from(value: Message<N, C, E>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<N: AsRef<str>, C: AsRef<[u8]>, E: AsRef<[Entry<N>]>> TryFrom<Message<N, C, E>> for Response<N, C, E>

Source§

type Error = Message<N, C, E>

The type returned in the event of a conversion error.
Source§

fn try_from( value: Message<N, C, E>, ) -> Result<Self, <Response<N, C, E> as TryFrom<Message<N, C, E>>>::Error>

Performs the conversion.
Source§

impl<N: AsRef<str>, C: AsRef<[u8]>, E: AsRef<[Entry<N>]>> TryFrom<Message<N, C, E>> for ResponseClose

Source§

type Error = Message<N, C, E>

The type returned in the event of a conversion error.
Source§

fn try_from(value: Message<N, C, E>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<N: AsRef<str>, C: AsRef<[u8]>, E: AsRef<[Entry<N>]>> TryFrom<Message<N, C, E>> for ResponseCopy

Source§

type Error = Message<N, C, E>

The type returned in the event of a conversion error.
Source§

fn try_from(value: Message<N, C, E>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<N: AsRef<str>, C: AsRef<[u8]>, E: AsRef<[Entry<N>]>> TryFrom<Message<N, C, E>> for ResponseDrop

Source§

type Error = Message<N, C, E>

The type returned in the event of a conversion error.
Source§

fn try_from(value: Message<N, C, E>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<N: AsRef<str>, C: AsRef<[u8]>, E: AsRef<[Entry<N>]>> TryFrom<Message<N, C, E>> for ResponseError

Source§

type Error = Message<N, C, E>

The type returned in the event of a conversion error.
Source§

fn try_from(value: Message<N, C, E>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<N: AsRef<str>, C: AsRef<[u8]>, E: AsRef<[Entry<N>]>> TryFrom<Message<N, C, E>> for ResponseIdentify

Source§

type Error = Message<N, C, E>

The type returned in the event of a conversion error.
Source§

fn try_from(value: Message<N, C, E>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

type Error = Message<N, C, E>

The type returned in the event of a conversion error.
Source§

fn try_from(value: Message<N, C, E>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<N: AsRef<str>, C: AsRef<[u8]>, E: AsRef<[Entry<N>]>> TryFrom<Message<N, C, E>> for ResponseList<N, E>

Source§

type Error = Message<N, C, E>

The type returned in the event of a conversion error.
Source§

fn try_from(value: Message<N, C, E>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<N: AsRef<str>, C: AsRef<[u8]>, E: AsRef<[Entry<N>]>> TryFrom<Message<N, C, E>> for ResponseMake

Source§

type Error = Message<N, C, E>

The type returned in the event of a conversion error.
Source§

fn try_from(value: Message<N, C, E>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<N: AsRef<str>, C: AsRef<[u8]>, E: AsRef<[Entry<N>]>> TryFrom<Message<N, C, E>> for ResponseMetadata

Source§

type Error = Message<N, C, E>

The type returned in the event of a conversion error.
Source§

fn try_from(value: Message<N, C, E>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<N: AsRef<str>, C: AsRef<[u8]>, E: AsRef<[Entry<N>]>> TryFrom<Message<N, C, E>> for ResponseOpen

Source§

type Error = Message<N, C, E>

The type returned in the event of a conversion error.
Source§

fn try_from(value: Message<N, C, E>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<N: AsRef<str>, C: AsRef<[u8]>, E: AsRef<[Entry<N>]>> TryFrom<Message<N, C, E>> for ResponseRead<C>

Source§

type Error = Message<N, C, E>

The type returned in the event of a conversion error.
Source§

fn try_from(value: Message<N, C, E>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<N: AsRef<str>, C: AsRef<[u8]>, E: AsRef<[Entry<N>]>> TryFrom<Message<N, C, E>> for ResponseRemove

Source§

type Error = Message<N, C, E>

The type returned in the event of a conversion error.
Source§

fn try_from(value: Message<N, C, E>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<N: AsRef<str>, C: AsRef<[u8]>, E: AsRef<[Entry<N>]>> TryFrom<Message<N, C, E>> for ResponseSeek

Source§

type Error = Message<N, C, E>

The type returned in the event of a conversion error.
Source§

fn try_from(value: Message<N, C, E>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<N: AsRef<str>, C: AsRef<[u8]>, E: AsRef<[Entry<N>]>> TryFrom<Message<N, C, E>> for ResponseSetmeta

Source§

type Error = Message<N, C, E>

The type returned in the event of a conversion error.
Source§

fn try_from(value: Message<N, C, E>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<N: AsRef<str>, C: AsRef<[u8]>, E: AsRef<[Entry<N>]>> TryFrom<Message<N, C, E>> for ResponseTell

Source§

type Error = Message<N, C, E>

The type returned in the event of a conversion error.
Source§

fn try_from(value: Message<N, C, E>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<N: AsRef<str>, C: AsRef<[u8]>, E: AsRef<[Entry<N>]>> TryFrom<Message<N, C, E>> for ResponseWrite

Source§

type Error = Message<N, C, E>

The type returned in the event of a conversion error.
Source§

fn try_from(value: Message<N, C, E>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<N: Eq + AsRef<str>, C: Eq + AsRef<[u8]>, E: Eq + AsRef<[Entry<N>]>> Eq for Message<N, C, E>

Source§

impl<N: AsRef<str>, C: AsRef<[u8]>, E: AsRef<[Entry<N>]>> StructuralPartialEq for Message<N, C, E>

Auto Trait Implementations§

§

impl<N, C, E> Freeze for Message<N, C, E>
where N: Freeze, C: Freeze, E: Freeze,

§

impl<N, C, E> RefUnwindSafe for Message<N, C, E>

§

impl<N, C, E> Send for Message<N, C, E>
where N: Send, C: Send, E: Send,

§

impl<N, C, E> Sync for Message<N, C, E>
where N: Sync, C: Sync, E: Sync,

§

impl<N, C, E> Unpin for Message<N, C, E>
where N: Unpin, C: Unpin, E: Unpin,

§

impl<N, C, E> UnsafeUnpin for Message<N, C, E>

§

impl<N, C, E> UnwindSafe for Message<N, C, E>
where N: UnwindSafe, C: UnwindSafe, E: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,