[−][src]Trait webdav_handler::ls::DavLockSystem
The trait that defines a locksystem.
Required methods
fn lock(
&self,
path: &WebPath,
principal: Option<&str>,
owner: Option<&Element>,
timeout: Option<Duration>,
shared: bool,
deep: bool
) -> Result<DavLock, DavLock>
&self,
path: &WebPath,
principal: Option<&str>,
owner: Option<&Element>,
timeout: Option<Duration>,
shared: bool,
deep: bool
) -> Result<DavLock, DavLock>
Lock a node. Returns Ok(new_lock) if succeeded, or Err(conflicting_lock) if failed.
fn unlock(&self, path: &WebPath, token: &str) -> Result<(), ()>
Unlock a node. Returns empty Ok if succeeded, empty Err if failed (because lock doesn't exist)
fn refresh(
&self,
path: &WebPath,
token: &str,
timeout: Option<Duration>
) -> Result<DavLock, ()>
&self,
path: &WebPath,
token: &str,
timeout: Option<Duration>
) -> Result<DavLock, ()>
Refresh lock. Returns updated lock if succeeded.
fn check(
&self,
path: &WebPath,
principal: Option<&str>,
ignore_principal: bool,
deep: bool,
submitted_tokens: Vec<&str>
) -> Result<(), DavLock>
&self,
path: &WebPath,
principal: Option<&str>,
ignore_principal: bool,
deep: bool,
submitted_tokens: Vec<&str>
) -> Result<(), DavLock>
Check if node is locked and if so, if we own all the locks. If not, returns as Err one conflicting lock.
fn discover(&self, path: &WebPath) -> Vec<DavLock>
Find and return all locks that cover a given path.
fn delete(&self, path: &WebPath) -> Result<(), ()>
Delete all locks at this path and below (after MOVE or DELETE)
Implementors
impl DavLockSystem for FakeLs[src]
fn lock(
&self,
path: &WebPath,
principal: Option<&str>,
owner: Option<&Element>,
timeout: Option<Duration>,
shared: bool,
deep: bool
) -> Result<DavLock, DavLock>[src]
&self,
path: &WebPath,
principal: Option<&str>,
owner: Option<&Element>,
timeout: Option<Duration>,
shared: bool,
deep: bool
) -> Result<DavLock, DavLock>
fn unlock(&self, _path: &WebPath, _token: &str) -> Result<(), ()>[src]
fn refresh(
&self,
path: &WebPath,
token: &str,
timeout: Option<Duration>
) -> Result<DavLock, ()>[src]
&self,
path: &WebPath,
token: &str,
timeout: Option<Duration>
) -> Result<DavLock, ()>
fn check(
&self,
_path: &WebPath,
_principal: Option<&str>,
_ignore_principal: bool,
_deep: bool,
_submitted_tokens: Vec<&str>
) -> Result<(), DavLock>[src]
&self,
_path: &WebPath,
_principal: Option<&str>,
_ignore_principal: bool,
_deep: bool,
_submitted_tokens: Vec<&str>
) -> Result<(), DavLock>
fn discover(&self, _path: &WebPath) -> Vec<DavLock>[src]
fn delete(&self, _path: &WebPath) -> Result<(), ()>[src]
impl DavLockSystem for MemLs[src]
fn lock(
&self,
path: &WebPath,
principal: Option<&str>,
owner: Option<&Element>,
timeout: Option<Duration>,
shared: bool,
deep: bool
) -> Result<DavLock, DavLock>[src]
&self,
path: &WebPath,
principal: Option<&str>,
owner: Option<&Element>,
timeout: Option<Duration>,
shared: bool,
deep: bool
) -> Result<DavLock, DavLock>
fn unlock(&self, path: &WebPath, token: &str) -> Result<(), ()>[src]
fn refresh(
&self,
path: &WebPath,
token: &str,
timeout: Option<Duration>
) -> Result<DavLock, ()>[src]
&self,
path: &WebPath,
token: &str,
timeout: Option<Duration>
) -> Result<DavLock, ()>
fn check(
&self,
path: &WebPath,
principal: Option<&str>,
ignore_principal: bool,
deep: bool,
submitted_tokens: Vec<&str>
) -> Result<(), DavLock>[src]
&self,
path: &WebPath,
principal: Option<&str>,
ignore_principal: bool,
deep: bool,
submitted_tokens: Vec<&str>
) -> Result<(), DavLock>