pub struct Surface {
pub actions: Vec<Action>,
pub views: Vec<View>,
}Expand description
What a module declares from Module::surface.
Fields§
§actions: Vec<Action>§views: Vec<View>Implementations§
Source§impl Surface
impl Surface
Sourcepub fn none() -> Self
pub fn none() -> Self
A module with no UI. The default of Module::surface.
pub fn new() -> Self
pub fn action(self, action: Action) -> Self
pub fn view(self, view: View) -> Self
Sourcepub fn validate(&self, module: &str, errors: &mut ConfigError)
pub fn validate(&self, module: &str, errors: &mut ConfigError)
Validates the declaration for module into errors, collecting
every problem (the Harness::build convention): duplicate or
malformed action names, paths not starting with /, an Admin
action outside /admin/ (or a non-admin one inside it), an input
schema that is not an object, and views naming unknown actions.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Surface
impl<'de> Deserialize<'de> for Surface
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
Auto Trait Implementations§
impl Freeze for Surface
impl RefUnwindSafe for Surface
impl Send for Surface
impl Sync for Surface
impl Unpin for Surface
impl UnsafeUnpin for Surface
impl UnwindSafe for Surface
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