com.digitalasset.canton.config.CantonRequireTypes
LengthLimitedString
Companion object LengthLimitedString
sealed trait LengthLimitedString extends AbstractLengthLimitedString
This trait wraps a String that is limited to a certain maximum length. Classes implementing
this trait expose create
and tryCreate
methods to safely (and non-safely) construct such a
String.
The canonical use case for LengthLimitedStrings is ensuring that we don't write too long strings into the database. This validation generally occurs on the server side and not on the client side. Concretely, this means that the Admin API and Ledger API gRPC services is the point where we validate that the received Protobuf Strings are not too long (and convert them into LengthLimitedStrings). On the client side, e.g. at the console, we generally take normal String types.
For longer strings, directly inherit from AbstractLengthLimitedString.
- Alphabetic
- By Inheritance
- LengthLimitedString
- AbstractLengthLimitedString
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def maxLength: PositiveInt
Maximum number of characters allowed.
Maximum number of characters allowed.
Must not be confused with storage space, which can be up to 4*maxLength in a UTF8 encoding
- Definition Classes
- AbstractLengthLimitedString
- abstract def str: String
- Attributes
- protected
- Definition Classes
- AbstractLengthLimitedString
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def canEqual(a: Any): Boolean
- Definition Classes
- AbstractLengthLimitedString
- Annotations
- @SuppressWarnings()
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(that: Any): Boolean
- Definition Classes
- AbstractLengthLimitedString → AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AbstractLengthLimitedString → AnyRef → Any
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def name: Option[String]
- Attributes
- protected
- Definition Classes
- AbstractLengthLimitedString
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def nonEmpty: Boolean
- Definition Classes
- AbstractLengthLimitedString
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toProtoPrimitive: String
- Definition Classes
- AbstractLengthLimitedString
- def toString(): String
- Definition Classes
- AbstractLengthLimitedString → AnyRef → Any
- def tryConcatenate(that: String): LengthLimitedStringVar
- def tryConcatenate(that: LengthLimitedString): LengthLimitedStringVar
- def unwrap: String
- Definition Classes
- AbstractLengthLimitedString
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])