pub struct FakeProtocol {
pub subprotocol: String,
pub stamp: String,
}Expand description
Speaks a made-up subprotocol and stamps everything it encodes, so a test can tell which protocol the client settled on.
Fields§
§subprotocol: StringThe subprotocol it negotiates under.
stamp: StringWhat it puts in front of every payload.
Implementations§
Source§impl FakeProtocol
impl FakeProtocol
Sourcepub fn v2() -> FakeProtocol
pub fn v2() -> FakeProtocol
A stand-in for a second protocol version, actioncable-v2-json.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FakeProtocol
impl RefUnwindSafe for FakeProtocol
impl Send for FakeProtocol
impl Sync for FakeProtocol
impl Unpin for FakeProtocol
impl UnsafeUnpin for FakeProtocol
impl UnwindSafe for FakeProtocol
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