Update unix_permissions.rs

This commit is contained in:
Nikolay Volf 2018-08-25 12:06:30 +03:00 committed by GitHub
parent c9322e22c3
commit 17fab427d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -1,9 +1,9 @@
/// A NOOP struct for bringing the API between Windows and Unix up to parity. To set permissions
/// properly on Unix, you can just use `std::os::unix::fs::PermissionsExt`.
pub struct SecurityAttributes {}
pub struct SecurityAttributes
impl SecurityAttributes {
pub fn empty() -> Self {Self{}}
pub fn allow_everyone_connect() -> Self {Self{}}
pub fn allow_everyone_create() -> Self {Self{}}
pub fn empty() -> Self { SecurityAttributes }
pub fn allow_everyone_connect() -> Self { SecurityAttributes }
pub fn allow_everyone_create() -> Self { SecurityAttributes }
}