MCPcopy Create free account
hub / github.com/MultiFuzz/MultiFuzz / serialize

Method serialize

icicle-cortexm/src/config.rs:482–491  ·  view source on GitHub ↗
(&self, serializer: S)

Source from the content-addressed store, hash-verified

480
481impl Serialize for Permissions {
482 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
483 where
484 S: serde::Serializer,
485 {
486 let mut buf = String::with_capacity(3);
487 buf.push(if self.0 & perm::READ != 0 { 'r' } else { '-' });
488 buf.push(if self.0 & perm::WRITE != 0 { 'w' } else { '-' });
489 buf.push(if self.0 & perm::EXEC != 0 { 'x' } else { '-' });
490 serializer.serialize_str(&buf)
491 }
492}
493
494#[derive(Debug, Clone, Serialize, Deserialize, Default)]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected