Skip to content

Commit

Permalink
chore: add default serde to SpacePermission (#364)
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasXu0 authored Jan 8, 2025
1 parent 4042add commit 98463cc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion collab-folder/src/space_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ pub struct SpaceInfo {
/// The permission of the space view.
///
/// If the space_permission is none, the space view will use the SpacePermission::PublicToAll.
#[serde(default)]
pub space_permission: SpacePermission,

/// The created time of the space view.
Expand Down Expand Up @@ -57,9 +58,10 @@ impl Default for SpaceInfo {
}
}

#[derive(Debug, Clone, serde_repr::Serialize_repr, serde_repr::Deserialize_repr)]
#[derive(Debug, Clone, Default, serde_repr::Serialize_repr, serde_repr::Deserialize_repr)]
#[repr(u8)]
pub enum SpacePermission {
#[default]
PublicToAll = 0,
Private = 1,
}

0 comments on commit 98463cc

Please sign in to comment.