pub struct Swift {
pub header: Cow<'static, str>,
pub indent: IndentStyle,
pub naming: NamingConvention,
pub generics: GenericStyle,
pub optionals: OptionalStyle,
pub protocols: Vec<Cow<'static, str>>,
}Expand description
Swift language exporter.
Fields§
§header: Cow<'static, str>Header comment for generated files.
indent: IndentStyleIndentation style for generated code.
naming: NamingConventionNaming convention for identifiers.
generics: GenericStyleGeneric type style.
optionals: OptionalStyleOptional type style.
protocols: Vec<Cow<'static, str>>Additional protocols to conform to.
Implementations§
Source§impl Swift
impl Swift
Sourcepub fn header(self, header: impl Into<Cow<'static, str>>) -> Self
pub fn header(self, header: impl Into<Cow<'static, str>>) -> Self
Set the header comment for generated files.
Sourcepub fn indent(self, style: IndentStyle) -> Self
pub fn indent(self, style: IndentStyle) -> Self
Set the indentation style.
Sourcepub fn naming(self, convention: NamingConvention) -> Self
pub fn naming(self, convention: NamingConvention) -> Self
Set the naming convention.
Sourcepub fn generics(self, style: GenericStyle) -> Self
pub fn generics(self, style: GenericStyle) -> Self
Set the generic type style.
Sourcepub fn optionals(self, style: OptionalStyle) -> Self
pub fn optionals(self, style: OptionalStyle) -> Self
Set the optional type style.
Sourcepub fn add_protocol(self, protocol: impl Into<Cow<'static, str>>) -> Self
pub fn add_protocol(self, protocol: impl Into<Cow<'static, str>>) -> Self
Add a protocol that all types should conform to.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Swift
impl RefUnwindSafe for Swift
impl Send for Swift
impl Sync for Swift
impl Unpin for Swift
impl UnsafeUnpin for Swift
impl UnwindSafe for Swift
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