pub struct CallSpec {
pub lang: String,
pub kind: CallKind,
pub name: String,
pub receiver: Option<Vec<String>>,
pub key_arg_index: usize,
}Expand description
A single translation call site descriptor ([[calls]]).
Fields§
§lang: StringLanguage this matcher applies to (php, js, twig, …).
kind: CallKind§name: StringWhat this matches, per kind:
function/method/filter→ the call/filter name (i18n,get);index→ the indexed object identifier (localeinlocale['key']), while the subscript carries the key.
receiver: Option<Vec<String>>For method: allowed receivers (e.g. ["i18n", "this.i18n"]). The $
and ->/. are normalized away by the extractor.
key_arg_index: usizeWhich argument holds the key (0-based). Defaults to 0.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CallSpec
impl<'de> Deserialize<'de> for CallSpec
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
Auto Trait Implementations§
impl Freeze for CallSpec
impl RefUnwindSafe for CallSpec
impl Send for CallSpec
impl Sync for CallSpec
impl Unpin for CallSpec
impl UnsafeUnpin for CallSpec
impl UnwindSafe for CallSpec
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more