pub trait Resource:
Clone
+ Send
+ 'static {
type Prop: ResourceProp + PartialEq + Clone + EnumVariants + PropName + Send;
type Error: From<Error>;
type Principal: Principal;
Show 14 methods
// Required methods
fn is_collection(&self) -> bool;
fn get_resourcetype(&self) -> Resourcetype;
fn get_prop(
&self,
principal_uri: &impl PrincipalUri,
principal: &Self::Principal,
prop: &<Self::Prop as PropName>::Names,
) -> Result<Self::Prop, Self::Error>;
fn get_displayname(&self) -> Option<&str>;
fn get_user_privileges(
&self,
principal: &Self::Principal,
) -> Result<UserPrivilegeSet, Self::Error>;
// Provided methods
fn list_props() -> Vec<(Option<Namespace<'static>>, &'static str)> { ... }
fn set_prop(&mut self, _prop: Self::Prop) -> Result<(), Error> { ... }
fn remove_prop(
&mut self,
_prop: &<Self::Prop as PropName>::Names,
) -> Result<(), Error> { ... }
fn set_displayname(&mut self, _name: Option<String>) -> Result<(), Error> { ... }
fn get_owner(&self) -> Option<&str> { ... }
fn get_etag(&self) -> Option<String> { ... }
fn satisfies_if_match(&self, if_match: &IfMatch) -> bool { ... }
fn satisfies_if_none_match(&self, if_none_match: &IfNoneMatch) -> bool { ... }
fn propfind(
&self,
path: &str,
prop: &PropfindType<<Self::Prop as PropName>::Names>,
principal_uri: &impl PrincipalUri,
principal: &Self::Principal,
) -> Result<ResponseElement<Self::Prop>, Self::Error> { ... }
}
Required Associated Types§
type Prop: ResourceProp + PartialEq + Clone + EnumVariants + PropName + Send
type Error: From<Error>
type Principal: Principal
Required Methods§
fn is_collection(&self) -> bool
fn get_resourcetype(&self) -> Resourcetype
fn get_prop( &self, principal_uri: &impl PrincipalUri, principal: &Self::Principal, prop: &<Self::Prop as PropName>::Names, ) -> Result<Self::Prop, Self::Error>
fn get_displayname(&self) -> Option<&str>
fn get_user_privileges( &self, principal: &Self::Principal, ) -> Result<UserPrivilegeSet, Self::Error>
Provided Methods§
fn list_props() -> Vec<(Option<Namespace<'static>>, &'static str)>
fn set_prop(&mut self, _prop: Self::Prop) -> Result<(), Error>
fn remove_prop( &mut self, _prop: &<Self::Prop as PropName>::Names, ) -> Result<(), Error>
fn set_displayname(&mut self, _name: Option<String>) -> Result<(), Error>
fn get_owner(&self) -> Option<&str>
fn get_etag(&self) -> Option<String>
fn satisfies_if_match(&self, if_match: &IfMatch) -> bool
fn satisfies_if_none_match(&self, if_none_match: &IfNoneMatch) -> bool
fn propfind( &self, path: &str, prop: &PropfindType<<Self::Prop as PropName>::Names>, principal_uri: &impl PrincipalUri, principal: &Self::Principal, ) -> Result<ResponseElement<Self::Prop>, Self::Error>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.