pub struct SponsorshipCreated {
pub action: SponsorshipCreatedAction,
pub sender: User,
pub sponsorship: SponsorshipCreatedSponsorship,
}
Expand description
SponsorshipCreated
JSON schema
{
"title": "sponsorship created event",
"type": "object",
"required": [
"action",
"sender",
"sponsorship"
],
"properties": {
"action": {
"type": "string",
"enum": [
"created"
]
},
"sender": {
"$ref": "#/definitions/user"
},
"sponsorship": {
"type": "object",
"required": [
"created_at",
"node_id",
"privacy_level",
"sponsor",
"sponsorable",
"tier"
],
"properties": {
"created_at": {
"type": "string",
"format": "date-time"
},
"node_id": {
"type": "string"
},
"privacy_level": {
"type": "string"
},
"sponsor": {
"$ref": "#/definitions/user"
},
"sponsorable": {
"$ref": "#/definitions/user"
},
"tier": {
"$ref": "#/definitions/sponsorship-tier"
}
},
"additionalProperties": false
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema"
}
Fields§
§action: SponsorshipCreatedAction
§sender: User
§sponsorship: SponsorshipCreatedSponsorship
Implementations§
Source§impl SponsorshipCreated
impl SponsorshipCreated
pub fn builder() -> SponsorshipCreated
Trait Implementations§
Source§impl Clone for SponsorshipCreated
impl Clone for SponsorshipCreated
Source§fn clone(&self) -> SponsorshipCreated
fn clone(&self) -> SponsorshipCreated
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SponsorshipCreated
impl Debug for SponsorshipCreated
Source§impl<'de> Deserialize<'de> for SponsorshipCreated
impl<'de> Deserialize<'de> for SponsorshipCreated
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<&SponsorshipCreated> for SponsorshipCreated
impl From<&SponsorshipCreated> for SponsorshipCreated
Source§fn from(value: &SponsorshipCreated) -> Self
fn from(value: &SponsorshipCreated) -> Self
Converts to this type from the input type.
Source§impl From<SponsorshipCreated> for SponsorshipCreated
impl From<SponsorshipCreated> for SponsorshipCreated
Source§fn from(value: SponsorshipCreated) -> Self
fn from(value: SponsorshipCreated) -> Self
Converts to this type from the input type.
Source§impl From<SponsorshipCreated> for SponsorshipEvent
impl From<SponsorshipCreated> for SponsorshipEvent
Source§fn from(value: SponsorshipCreated) -> Self
fn from(value: SponsorshipCreated) -> Self
Converts to this type from the input type.
Source§impl Serialize for SponsorshipCreated
impl Serialize for SponsorshipCreated
Auto Trait Implementations§
impl Freeze for SponsorshipCreated
impl RefUnwindSafe for SponsorshipCreated
impl Send for SponsorshipCreated
impl Sync for SponsorshipCreated
impl Unpin for SponsorshipCreated
impl UnwindSafe for SponsorshipCreated
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