[go: up one dir, main page]

fslock 0.1.7

A library to use files as locks
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::{sys::FileDesc, Error, Exclusivity};

#[derive(Debug, Copy, Clone)]
pub struct FileId;

impl FileId {
    pub(crate) fn get_id(_: FileDesc, _: Exclusivity) -> Result<Self, Error> {
        Ok(FileId)
    }
    pub fn take_lock(&self) {}
    pub fn try_take_lock(&self) -> bool {
        true
    }
    pub fn release_lock(&self) {}
}