pub struct Shared<T>(/* private fields */);Expand description
An event many streams send — one change fanned out to every watcher.
The first socket that sends it encodes it, once; every other writes
those bytes as they are (PERF-7’s fan-out). Anywhere else (in process, a
Value, another encoding) it serializes as T does. Reads as T.
An event that carries a credential is not kept encoded: each stream
encodes it, so each assembles its own _credentials envelope.
Implementations§
Sourcepub fn is_encoded(&self) -> bool
pub fn is_encoded(&self) -> bool
Whether this event has been encoded (a socket has sent it).
Trait Implementations§
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Auto Trait Implementations§
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