Trait Resource

Source
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§

Required Methods§

Source

fn is_collection(&self) -> bool

Source

fn get_resourcetype(&self) -> Resourcetype

Source

fn get_prop( &self, principal_uri: &impl PrincipalUri, principal: &Self::Principal, prop: &<Self::Prop as PropName>::Names, ) -> Result<Self::Prop, Self::Error>

Source

fn get_displayname(&self) -> Option<&str>

Source

fn get_user_privileges( &self, principal: &Self::Principal, ) -> Result<UserPrivilegeSet, Self::Error>

Provided Methods§

Source

fn list_props() -> Vec<(Option<Namespace<'static>>, &'static str)>

Source

fn set_prop(&mut self, _prop: Self::Prop) -> Result<(), Error>

Source

fn remove_prop( &mut self, _prop: &<Self::Prop as PropName>::Names, ) -> Result<(), Error>

Source

fn set_displayname(&mut self, _name: Option<String>) -> Result<(), Error>

Source

fn get_owner(&self) -> Option<&str>

Source

fn get_etag(&self) -> Option<String>

Source

fn satisfies_if_match(&self, if_match: &IfMatch) -> bool

Source

fn satisfies_if_none_match(&self, if_none_match: &IfNoneMatch) -> bool

Source

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.

Implementors§