pub struct Protocol {
pub delete: bool,
pub permissions: PermissionOptions,
pub schema: Option<String>,
pub channel: Option<ChannelProtocol>,
}
Fields§
§delete: bool
§permissions: PermissionOptions
§schema: Option<String>
§channel: Option<ChannelProtocol>
Implementations§
source§impl Protocol
impl Protocol
pub fn system_protocols() -> BTreeMap<Hash, Self>
pub fn folder() -> Self
pub fn configure_protocol() -> Self
pub fn channel_item() -> Self
pub fn permission_grant() -> Self
pub fn file() -> Self
pub fn dms_channel() -> Self
pub fn is_sys_protocol(&self) -> bool
pub fn trim_perms(&self, perms: &Permission) -> Result<Permission, Error>
pub fn validate_child( &self, perm_record: &PermissionedRecord, ) -> Result<(), Error>
pub fn validate( &self, permissioned_record: &PermissionedRecord, ) -> Result<(), Error>
pub fn validate_self(&self) -> Result<(), Error>
pub fn validate_payload(&self, payload: &[u8]) -> Result<(), Error>
Trait Implementations§
source§impl<'de> Deserialize<'de> for Protocol
impl<'de> Deserialize<'de> for Protocol
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Indexable for Protocol
impl Indexable for Protocol
const PRIMARY_KEY: &'static str = "primary_key"
const DEFAULT_SORT: &'static str = Self::PRIMARY_KEY
fn primary_key(&self) -> Vec<u8> ⓘ
fn secondary_keys(&self) -> Index
source§impl JsonSchema for Protocol
impl JsonSchema for Protocol
source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moresource§impl Ord for Protocol
impl Ord for Protocol
source§impl PartialOrd for Protocol
impl PartialOrd for Protocol
impl Eq for Protocol
impl StructuralPartialEq for Protocol
Auto Trait Implementations§
impl Freeze for Protocol
impl RefUnwindSafe for Protocol
impl Send for Protocol
impl Sync for Protocol
impl Unpin for Protocol
impl UnwindSafe for Protocol
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.