pub enum RecipientBody {
Apns {
device_token: String,
},
Fcm {
registration_token: String,
},
WebPush {
endpoint: String,
p256dh: String,
auth: String,
},
}Expand description
A recipient on the wire, in the port’s own JSON form.
A mirror of Recipient rather than the type itself, because the port
does not derive JsonSchema and a module’s body types must. The mirror
is byte-compatible with Recipient’s serialisation — including the
web_push tag, which is the port’s spelling and not the webpush of
the transport column — and tests/routes.rs pins that.
Variants§
Trait Implementations§
Source§impl Clone for RecipientBody
impl Clone for RecipientBody
Source§impl Debug for RecipientBody
impl Debug for RecipientBody
Source§impl<'de> Deserialize<'de> for RecipientBody
impl<'de> Deserialize<'de> for RecipientBody
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 From<RecipientBody> for Recipient
impl From<RecipientBody> for Recipient
Source§fn from(body: RecipientBody) -> Self
fn from(body: RecipientBody) -> Self
Converts to this type from the input type.
Source§impl JsonSchema for RecipientBody
impl JsonSchema for RecipientBody
Source§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
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 moreAuto Trait Implementations§
impl Freeze for RecipientBody
impl RefUnwindSafe for RecipientBody
impl Send for RecipientBody
impl Sync for RecipientBody
impl Unpin for RecipientBody
impl UnsafeUnpin for RecipientBody
impl UnwindSafe for RecipientBody
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