astreams
: Merge impl blocks
This commit is contained in:
parent
fe8d345eff
commit
3146df6898
1 changed files with 102 additions and 134 deletions
|
@ -184,142 +184,110 @@ macro_rules! vocab {
|
|||
}
|
||||
}
|
||||
|
||||
$(
|
||||
impl<'b, B> $vocab_ref<'b, B>
|
||||
where B: $crate::linkeddata::HasLinkedDataInterface
|
||||
{
|
||||
$(
|
||||
$( #[ $one_get_meta ] )*
|
||||
pub fn $one_get_name(&'b self) -> $crate::linkeddata::ResultGetOne<$one_type> {
|
||||
self.backend.$one_get_via($one_iri)
|
||||
}
|
||||
)*
|
||||
}
|
||||
impl<'b, B> $vocab_ref<'b, B>
|
||||
where B: $crate::linkeddata::HasLinkedDataInterface
|
||||
{
|
||||
$($(
|
||||
$( #[ $one_get_meta ] )*
|
||||
pub fn $one_get_name(&'b self) -> $crate::linkeddata::ResultGetOne<$one_type> {
|
||||
self.backend.$one_get_via($one_iri)
|
||||
}
|
||||
)*)?
|
||||
|
||||
impl<'b, B> $vocab_mut<'b, B>
|
||||
where B: $crate::linkeddata::HasLinkedDataInterface
|
||||
{
|
||||
$(
|
||||
$( #[ $one_get_meta ] )*
|
||||
pub fn $one_get_name(&'b self) -> $crate::linkeddata::ResultGetOne<$one_type> {
|
||||
self.backend.$one_get_via($one_iri)
|
||||
}
|
||||
)*
|
||||
|
||||
$(
|
||||
$( #[ $one_set_meta ] )*
|
||||
pub fn $one_set_name(&'b mut self, value: $one_type) -> $crate::linkeddata::ResultSetOne {
|
||||
self.backend.$one_set_via($one_iri, value)
|
||||
}
|
||||
)*
|
||||
}
|
||||
)?
|
||||
|
||||
$(
|
||||
impl<'b, B> $vocab_ref<'b, B>
|
||||
where B: $crate::linkeddata::HasLinkedDataInterface
|
||||
{
|
||||
$(
|
||||
$( #[ $many_get_meta ] )*
|
||||
pub fn $many_get_name(&'b self) -> $crate::linkeddata::ResultGetMany<$many_type> {
|
||||
self.backend.$many_get_via($many_iri)
|
||||
}
|
||||
)*
|
||||
}
|
||||
$($(
|
||||
$( #[ $many_get_meta ] )*
|
||||
pub fn $many_get_name(&'b self) -> $crate::linkeddata::ResultGetMany<$many_type> {
|
||||
self.backend.$many_get_via($many_iri)
|
||||
}
|
||||
)*)?
|
||||
|
||||
impl<'b, B> $vocab_mut<'b, B>
|
||||
where B: $crate::linkeddata::HasLinkedDataInterface
|
||||
{
|
||||
$(
|
||||
$( #[ $many_get_meta ] )*
|
||||
pub fn $many_get_name(&'b self) -> $crate::linkeddata::ResultGetMany<$many_type> {
|
||||
self.backend.$many_get_via($many_iri)
|
||||
}
|
||||
)*
|
||||
|
||||
$(
|
||||
$( #[ $many_set_meta ] )*
|
||||
pub fn $many_set_name(&'b mut self, values: Vec<$many_type>) -> $crate::linkeddata::ResultSetMany {
|
||||
self.backend.$many_set_via($many_iri, values)
|
||||
}
|
||||
)*
|
||||
}
|
||||
)?
|
||||
$($(
|
||||
$( #[ $child_get_meta ] )*
|
||||
pub fn $child_get_name(&'b self) -> $crate::linkeddata::ResultGetOne<&'b B> {
|
||||
self.backend.ld_get_child($child_iri)
|
||||
}
|
||||
)*)?
|
||||
|
||||
$($(
|
||||
$( #[ $children_get_meta ] )*
|
||||
pub fn $children_get_name(&'b self) -> $crate::linkeddata::ResultGetMany<&'b B> {
|
||||
self.backend.ld_get_children($children_iri)
|
||||
}
|
||||
)*)?
|
||||
}
|
||||
|
||||
$(
|
||||
impl<'b, B> $vocab_ref<'b, B>
|
||||
where B: $crate::linkeddata::HasLinkedDataInterface
|
||||
{
|
||||
$(
|
||||
$( #[ $child_get_meta ] )*
|
||||
pub fn $child_get_name(&'b self) -> $crate::linkeddata::ResultGetOne<&'b B> {
|
||||
self.backend.ld_get_child($child_iri)
|
||||
}
|
||||
)*
|
||||
}
|
||||
|
||||
impl<'b, B> $vocab_mut<'b, B>
|
||||
where B: $crate::linkeddata::HasLinkedDataInterface
|
||||
{
|
||||
$(
|
||||
$( #[ $child_get_meta ] )*
|
||||
pub fn $child_get_name(&'b self) -> $crate::linkeddata::ResultGetOne<&'b B> {
|
||||
self.backend.ld_get_child($child_iri)
|
||||
}
|
||||
)*
|
||||
|
||||
$(
|
||||
$( #[ $child_into_meta ] )*
|
||||
pub fn $child_into_name(self) -> $crate::linkeddata::ResultGetOne<&'b mut B> {
|
||||
self.backend.ld_into_child_mut($child_iri)
|
||||
}
|
||||
)*
|
||||
|
||||
$(
|
||||
$( #[ $child_into_meta ] )*
|
||||
pub fn $child_set_name(&'b mut self, value: B) -> $crate::linkeddata::ResultSetOne {
|
||||
self.backend.ld_set_child($child_iri, value)
|
||||
}
|
||||
)*
|
||||
}
|
||||
)?
|
||||
|
||||
$(
|
||||
impl<'b, B> $vocab_ref<'b, B>
|
||||
where B: $crate::linkeddata::HasLinkedDataInterface
|
||||
{
|
||||
$(
|
||||
$( #[ $children_get_meta ] )*
|
||||
pub fn $children_get_name(&'b self) -> $crate::linkeddata::ResultGetMany<&'b B> {
|
||||
self.backend.ld_get_children($children_iri)
|
||||
}
|
||||
)*
|
||||
}
|
||||
|
||||
impl<'b, B> $vocab_mut<'b, B>
|
||||
where B: $crate::linkeddata::HasLinkedDataInterface
|
||||
{
|
||||
$(
|
||||
$( #[ $children_get_meta ] )*
|
||||
pub fn $children_get_name(&'b self) -> $crate::linkeddata::ResultGetMany<&'b B> {
|
||||
self.backend.ld_get_children($children_iri)
|
||||
}
|
||||
)*
|
||||
|
||||
$(
|
||||
$( #[ $children_into_meta ] )*
|
||||
pub fn $children_into_name(self) -> $crate::linkeddata::ResultGetMany<&'b mut B> {
|
||||
self.backend.ld_into_children_mut($children_iri)
|
||||
}
|
||||
)*
|
||||
|
||||
$(
|
||||
$( #[ $children_into_meta ] )*
|
||||
pub fn $children_set_name(&'b mut self, values: Vec<B>) -> $crate::linkeddata::ResultSetMany {
|
||||
self.backend.ld_set_children($children_iri, values)
|
||||
}
|
||||
)*
|
||||
}
|
||||
)?
|
||||
impl<'b, B> $vocab_mut<'b, B>
|
||||
where B: $crate::linkeddata::HasLinkedDataInterface
|
||||
{
|
||||
$($(
|
||||
$( #[ $one_get_meta ] )*
|
||||
pub fn $one_get_name(&'b self) -> $crate::linkeddata::ResultGetOne<$one_type> {
|
||||
self.backend.$one_get_via($one_iri)
|
||||
}
|
||||
)*)?
|
||||
|
||||
$($(
|
||||
$( #[ $one_set_meta ] )*
|
||||
pub fn $one_set_name(&'b mut self, value: $one_type) -> $crate::linkeddata::ResultSetOne {
|
||||
self.backend.$one_set_via($one_iri, value)
|
||||
}
|
||||
)*)?
|
||||
|
||||
$($(
|
||||
$( #[ $many_get_meta ] )*
|
||||
pub fn $many_get_name(&'b self) -> $crate::linkeddata::ResultGetMany<$many_type> {
|
||||
self.backend.$many_get_via($many_iri)
|
||||
}
|
||||
)*)?
|
||||
|
||||
$($(
|
||||
$( #[ $many_set_meta ] )*
|
||||
pub fn $many_set_name(&'b mut self, values: Vec<$many_type>) -> $crate::linkeddata::ResultSetMany {
|
||||
self.backend.$many_set_via($many_iri, values)
|
||||
}
|
||||
)*)?
|
||||
|
||||
$($(
|
||||
$( #[ $child_get_meta ] )*
|
||||
pub fn $child_get_name(&'b self) -> $crate::linkeddata::ResultGetOne<&'b B> {
|
||||
self.backend.ld_get_child($child_iri)
|
||||
}
|
||||
)*)?
|
||||
|
||||
$($(
|
||||
$( #[ $child_into_meta ] )*
|
||||
pub fn $child_into_name(self) -> $crate::linkeddata::ResultGetOne<&'b mut B> {
|
||||
self.backend.ld_into_child_mut($child_iri)
|
||||
}
|
||||
)*)?
|
||||
|
||||
$($(
|
||||
$( #[ $child_into_meta ] )*
|
||||
pub fn $child_set_name(&'b mut self, value: B) -> $crate::linkeddata::ResultSetOne {
|
||||
self.backend.ld_set_child($child_iri, value)
|
||||
}
|
||||
)*)?
|
||||
|
||||
$($(
|
||||
$( #[ $children_get_meta ] )*
|
||||
pub fn $children_get_name(&'b self) -> $crate::linkeddata::ResultGetMany<&'b B> {
|
||||
self.backend.ld_get_children($children_iri)
|
||||
}
|
||||
)*)?
|
||||
|
||||
$($(
|
||||
$( #[ $children_into_meta ] )*
|
||||
pub fn $children_into_name(self) -> $crate::linkeddata::ResultGetMany<&'b mut B> {
|
||||
self.backend.ld_into_children_mut($children_iri)
|
||||
}
|
||||
)*)?
|
||||
|
||||
$($(
|
||||
$( #[ $children_into_meta ] )*
|
||||
pub fn $children_set_name(&'b mut self, values: Vec<B>) -> $crate::linkeddata::ResultSetMany {
|
||||
self.backend.ld_set_children($children_iri, values)
|
||||
}
|
||||
)*)?
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue