pub fn extend(&self, access: ApiAccess, scope: Scope) -> Scope {
        match access {
            ApiAccess::Public => {
                let items = self
                    .inner
                    .iter()
                    .map(|(name, builder)| (name.as_ref(), &builder.public_scope));

                Self::bind(items, scope)
            }
            ApiAccess::Private => {
                let items = self
                    .inner
                    .iter()
                    .map(|(name, builder)| (name.as_ref(), &builder.private_scope));

                Self::bind(items, scope)
            }
        }
    }
/// Untuk meng-extend scope dengan endpoint yang kita inginkan.
///
/// # Arguments
///
/// * `access` - API access kind.
/// * `scope` - Actix scope instance.
Untuk meng-extend scope dengan endpoint yang kita inginkan.
Untuk meng - extend scope dengan endpoint yang kita inginkan .
pub fn extend(&self, access: ApiAccess, scope: Scope) -> Scope {
        match access {
            ApiAccess::Public => {
                let items = self
                    .inner
                    .iter()
                    .map(|(name, builder)| (name.as_ref(), &builder.public_scope));
                Self::bind(items, scope)
            }
            ApiAccess::Private => {
                let items = self
                    .inner
                    .iter()
                    .map(|(name, builder)| (name.as_ref(), &builder.private_scope));
                Self::bind(items, scope)
            }
        }
    }
pub fn extend ( & self , access : ApiAccess , scope : Scope ) -> Scope { match access { ApiAccess :: Public => { let items = self . inner . iter ( ) . map ( | ( name , builder ) | ( name . as_ref ( ) , & builder . public_scope ) ) ; Self :: bind ( items , scope ) } ApiAccess :: Private => { let items = self . inner . iter ( ) . map ( | ( name , builder ) | ( name . as_ref ( ) , & builder . private_scope ) ) ; Self :: bind ( items , scope ) } } }
Untuk meng-extend scope dengan endpoint yang kita inginkan.
Untuk meng - extend scope dengan endpoint yang kita inginkan .
&self
access
ApiAccess
scope
Scope
&self
access
ApiAccess
scope
Scope