pub struct User {
pub object: String,
pub id: String,
pub name: Option<String>,
pub avatar_url: Option<String>,
pub type: Option<String>,
pub person: Option<PersonDetail>,
pub bot: Option<BotDetail>,
}
Fields§
§object: String
always “user”
id: String
Unique identifier for this user.
name: Option<String>
User’s name, as displayed in Notion.
avatar_url: Option<String>
Chosen avatar image.
type: Option<String>
“person” or “bot”
person: Option<PersonDetail>
Properties only present for non-bot users.
bot: Option<BotDetail>
Since all fields are optional, it might result in an empty object. {}
Implementations§
Source§impl User
impl User
Sourcepub fn id<T>(self, id: T) -> Self
pub fn id<T>(self, id: T) -> Self
Set the value of the id
field.
Unique identifier for this user.
Sourcepub fn name<T>(self, name: T) -> Self
pub fn name<T>(self, name: T) -> Self
Set the value of the name
field.
User’s name, as displayed in Notion.
Sourcepub fn avatar_url<T>(self, avatar_url: T) -> Self
pub fn avatar_url<T>(self, avatar_url: T) -> Self
Set the value of the avatar_url
field.
Chosen avatar image.
Sourcepub fn person(self, person: PersonDetail) -> Self
pub fn person(self, person: PersonDetail) -> Self
Set the value of the person
field.
Properties only present for non-bot users.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for User
impl<'de> Deserialize<'de> for User
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
impl Eq for User
impl StructuralPartialEq for User
Auto Trait Implementations§
impl Freeze for User
impl RefUnwindSafe for User
impl Send for User
impl Sync for User
impl Unpin for User
impl UnwindSafe for User
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