Creates a semantic mode attribute operation.
(
trunk_id: TrunkId,
path: String,
mode: u16,
)
| 173 | |
| 174 | /// Creates a semantic mode attribute operation. |
| 175 | pub fn set_mode( |
| 176 | trunk_id: TrunkId, |
| 177 | path: String, |
| 178 | mode: u16, |
| 179 | ) -> Result<Self, crate::change::AttrValueError> { |
| 180 | crate::change::InodeAttr::Mode(mode).validate()?; |
| 181 | Ok(Self { |
| 182 | trunk_id, |
| 183 | path, |
| 184 | trunk_op: Some(TrunkOp::SetMode { |
| 185 | trunk: trunk_id, |
| 186 | mode, |
| 187 | }), |
| 188 | line_ops: Vec::new(), |
| 189 | }) |
| 190 | } |
| 191 | |
| 192 | /// Creates a semantic inode-kind attribute operation. |
| 193 | pub fn set_kind(trunk_id: TrunkId, path: String, kind: crate::change::InodeKind) -> Self { |