Struct tentacle::service::ProtocolMeta [−][src]
pub struct ProtocolMeta { /* fields omitted */ }
Define the minimum data required for a custom protocol
Implementations
impl ProtocolMeta
[src]
impl ProtocolMeta
[src]pub fn id(&self) -> ProtocolId
[src]
pub fn id(&self) -> ProtocolId
[src]Protocol id
pub fn support_versions(&self) -> Vec<String>
[src]
pub fn support_versions(&self) -> Vec<String>
[src]Protocol supported version
pub fn codec(&self) -> Box<dyn Codec + Send + 'static>
[src]
pub fn codec(&self) -> Box<dyn Codec + Send + 'static>
[src]The codec used by the custom protocol, such as LengthDelimitedCodec
by tokio
pub fn service_handle(
&mut self
) -> ProtocolHandle<Box<dyn ServiceProtocol + Send + Unpin + 'static>>
[src]
pub fn service_handle(
&mut self
) -> ProtocolHandle<Box<dyn ServiceProtocol + Send + Unpin + 'static>>
[src]pub fn session_handle(
&mut self
) -> ProtocolHandle<Box<dyn SessionProtocol + Send + Unpin + 'static>>
[src]
pub fn session_handle(
&mut self
) -> ProtocolHandle<Box<dyn SessionProtocol + Send + Unpin + 'static>>
[src]A session level callback handle for a protocol.
Behavior
When a session is opened, whenever the protocol of the session is opened, the function will be called again to generate the corresponding exclusive handle.
Correspondingly, whenever the protocol is closed, the corresponding exclusive handle is cleared.
pub fn blocking_flag(&self) -> BlockingFlag
[src]
pub fn blocking_flag(&self) -> BlockingFlag
[src]Control whether the protocol handle method requires blocking to run
Auto Trait Implementations
impl !RefUnwindSafe for ProtocolMeta
impl Send for ProtocolMeta
impl !Sync for ProtocolMeta
impl Unpin for ProtocolMeta
impl !UnwindSafe for ProtocolMeta
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,