Hi, Cerbos team I have a policy condition like thi...
# community
a
Hi, Cerbos team I have a policy condition like this
Copy code
expr: request.resource.attr.share_read_list.exists(t, t.id == request.principal.id)
and I would like to implement it and add a list of string in resouce attr in Rust, but it said AttrVal wasn't implemented for list, vec, or iter May you give me some example of this
d
Hi, you need to wrap the list into a ListVal tuple struct:
ListVal(["Alex"])
. It supports any type that implements
IntoIterator
Copy code
#[derive(Debug, Clone)]
pub struct ListVal<V, I>(pub I)
where
    V: AttrVal,
    I: IntoIterator<Item = V>;
a
thx a lot